Extract hashtags from text

Extract hashtags finds every #tag in pasted text and lists them one per line. The match rule is #[\w]+: a literal hash followed by one or more word characters (letters, digits, underscore). Tags stop at the first space, punctuation or symbol that is not a word character. The transform runs in your browser.

Input
Line 1:1 LF cloud_done Saved locally
Result Extract Hashtags
0 lines 0 chars

How hashtag matching works here

The pattern #[\w]+ captures a hash sign followed by one or more characters in [A-Za-z0-9_]. Tags stop at the first space, punctuation, emoji or accented character. So #spring, #travel2026 and #behind_the_scenes all match in full, while #café is captured as #caf because é is not in the ASCII word class.

A double hash ##bonus is read as a hash followed by #bonus; the leading # on its own is dropped because the pattern requires at least one word character after the hash. Hash-prefixed numeric tokens like #1 or #2026 match too.

Output is one tag per line in the order they appear, including the leading hash. Duplicates are kept; pipe the result through remove duplicate lines for a unique tag list.

How to use extract hashtags from text

  1. 1Paste the post, caption or message into the input panel.
  2. 2The output panel shows every hashtag, one per line.
  3. 3Click Copy to copy the list.
  4. 4Click Download to save it as a plain-text file.
  5. 5For unique tags only, send the result to remove duplicate lines.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What counts as a hashtag here

Hash followed by word characters

Letters A-Z a-z, digits 0-9 and underscore are accepted in the tag body. #travel, #travel2026 and #behind_the_scenes all match.

Stops at non-word characters

Spaces, punctuation, emoji and accented letters terminate the match. #café is captured as #caf; #tag! is captured as #tag.

Numeric-only tags allowed

#1, #2026 and #100days all match. The pattern does not require a leading letter.

Double-hash collapses

##bonus matches as #bonus. The first hash on its own is not a valid tag because the pattern needs at least one word character after the hash.

Order preserved, duplicates kept

Tags appear in source order. Duplicates are not removed; for a unique list pipe the output into remove duplicate lines.

Worked example

Notice #café stops at the accented letter and is captured as #caf. The duplicate #tag1 is kept; dedupe afterwards if you need unique tags only.

Input
Loving the #spring vibes! #photography #naturelovers
#travel2026 #behind_the_scenes #café gets clipped.
#tag1 #tag1 (duplicate kept).
Output
#spring
#photography
#naturelovers
#travel2026
#behind_the_scenes
#caf
#tag1
#tag1

Settings reference

Behaviour Effect on output
Tag body characters Letters A-Z a-z, digits 0-9, underscore.
Accented letters Not in the word class. #café matches as #caf.
Emoji and punctuation Terminate the match. #tag! gives #tag.
Numeric-only tags Allowed. #1, #2026 match.
Double hash Collapses. ##bonus gives #bonus.
Order and duplicates Source order kept, duplicates kept.

FAQ

Why does #café get clipped to #caf?
The match rule uses the ASCII word class [\w], which is letters, digits and underscore only. Accented letters and other Unicode letters terminate the tag. To capture full Unicode tags, switch to extract regex matches with the pattern #[\p{L}\p{N}_]+ and the gu flag.
Are emoji-only tags supported?
No. Emoji are outside the ASCII word class, so # followed by an emoji does not match. Emoji embedded mid-tag also terminate the tag at that point.
Is the leading hash included in each match?
Yes. Each line in the output starts with #. Strip them with find and replace if you want the bare tag bodies.
Are duplicates removed?
No. Every tag is kept in source order. Use remove duplicate lines for a unique list.
Is anything sent to a server?
No. The match runs entirely in your browser.