Extract hashtag

Collect hash-prefixed ASCII tags whose first character is a letter and whose remainder contains letters, digits, or underscores.

freeworks offlinenothing uploaded
ToolHashtag Extractor
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A global regular expression scans left to right for # plus an ASCII letter and continues through ASCII alphanumerics or underscore. Exact duplicates are removed initially, while lowercasing and removal of the leading hash remain optional.

  • Unique output with the # retained is the default because it preserves a paste-ready tag list.
  • This grammar is intentionally narrower than the evolving Unicode rules of individual social platforms.

Worked example

Extract hashtags from a post
Pull out hashtags from social media text
Input
											Just launched our new feature! #ProductUpdate #WebDev #Launch2024
										
Output
												Hashtags: #ProductUpdate, #WebDev, #Launch2024
Tags: ProductUpdate, WebDev, Launch2024
Count: 3
Unique: #ProductUpdate, #WebDev, #Launch2024
											

When to use this

Social exports yield tag lists, campaign reports deduplicate branded labels, and moderation fixtures extract ASCII hash tokens from chat transcripts.

Edge cases

  • #2026 is skipped because the first code point after # is a digit rather than an ASCII letter.
  • #café stops at #caf, and a tag written only in Arabic or Japanese does not match.
  • #Launch and #launch stay distinct until lowercase conversion is selected.