Mastodon Hashtag Formatting Rules: What Is Supported
🔍 WiseChecker

Mastodon Hashtag Formatting Rules: What Is Supported

When you post on Mastodon, hashtags help your content reach users beyond your followers. But Mastodon does not accept every character you might type in a hashtag. Many users find that a hashtag with spaces, punctuation, or mixed case does not work as expected. The platform enforces strict formatting rules based on the Unicode standard. This article explains exactly which characters Mastodon supports in hashtags and which ones it ignores or breaks.

Key Takeaways: Mastodon Hashtag Formatting Rules

  • Letters and digits from any script: Mastodon supports Latin, Cyrillic, Arabic, CJK, and all other Unicode script letters and digits.
  • Underscore and combining marks: The underscore character and combining diacritical marks are allowed inside a hashtag.
  • Spaces, punctuation, and symbols: Spaces, hyphens, periods, commas, exclamation marks, and most symbols break the hashtag at that point.
  • Case sensitivity and clickability: Hashtags are case-insensitive for search but preserve the original case in display; only the first clickable segment after the # counts.

How Mastodon Parses Hashtag Characters

Mastodon uses the Unicode standard to decide whether a character can be part of a hashtag. The hashtag itself starts with the number sign character #. Everything that follows is scanned character by character. As soon as Mastodon encounters a character that does not belong to the allowed set, it stops the hashtag at that point. The characters that are allowed include letters from any alphabet, digits from any numeral system, the underscore, and combining marks such as accents and diacritics. Characters that are not allowed include spaces, hyphens, periods, commas, exclamation points, question marks, and most punctuation or symbols.

When you type a hashtag that contains a disallowed character, Mastodon does not display an error. Instead, it silently breaks the hashtag at the first disallowed character. The part before the break becomes a clickable hashtag. The part after the break appears as plain text. For example, typing #my-hashtag results in a clickable #my followed by plain text -hashtag.

This behavior is different from some other platforms. Twitter and Instagram allow hyphens in hashtags, but Mastodon does not. Mastodon also treats uppercase and lowercase letters as equivalent for search purposes. A search for #mastodon returns posts tagged with #Mastodon or #MASTODON. The display preserves whatever case you typed, so #Mastodon appears with a capital M in your post.

Allowed Character Categories

The allowed characters fall into three categories. First, Unicode letters from any script: Latin, Greek, Cyrillic, Arabic, Hebrew, Chinese, Japanese, Korean, and hundreds more. Second, Unicode digits from any script: Western Arabic numerals, Eastern Arabic numerals, Devanagari digits, and others. Third, the underscore character and Unicode combining marks. Combining marks include acute accents, grave accents, umlauts, tildes, and other diacritics that attach to a preceding letter. These marks are allowed only if they appear after a base letter or underscore. They cannot appear as the first character after the # sign.

Disallowed Character Categories

Mastodon rejects spaces, tabs, and line breaks. It also rejects punctuation marks such as periods, commas, semicolons, colons, exclamation points, question marks, hyphens, en dashes, em dashes, apostrophes, quotation marks, parentheses, brackets, and slashes. Symbols like the at sign, dollar sign, percent sign, ampersand, asterisk, plus sign, equals sign, and tilde are also disallowed. Emoji characters are not allowed inside a hashtag. If you place an emoji after the # sign, it breaks the hashtag at that point.

Steps to Write a Correct Mastodon Hashtag

Follow these steps to ensure your hashtag is fully clickable and searchable. The same rules apply in the Mastodon web interface, official mobile apps, and third-party clients.

  1. Type the # sign immediately before the first character
    Do not insert a space between # and the first letter or digit. Example: #Mastodon works. # Mastodon does not.
  2. Use only allowed characters for the entire tag
    After the # sign, type only letters, digits, underscores, and combining marks. Avoid hyphens, periods, commas, apostrophes, and all other punctuation. Example: #social_media works. #social-media breaks.
  3. Check that the tag contains no spaces
    If you need multiple words, join them with underscores or use camel case. Example: #fediverse_tips or #FediverseTips. Both are clickable.
  4. Verify the tag in the compose box before posting
    Mastodon highlights clickable hashtags in blue. If part of your tag remains black, that part is plain text. Edit the tag to remove the disallowed character.

Common Mistakes and Misconceptions About Mastodon Hashtags

Hyphenated hashtags do not work

Many users coming from Twitter expect #my-hashtag to be a single tag. On Mastodon, the hyphen is a disallowed character. The tag breaks into #my and plain text -hashtag. Use an underscore or camel case instead: #my_hashtag or #MyHashtag.

Hashtags with numbers are fine

Digits are allowed anywhere in the tag after the # sign. #2024 and #Mastodon4 are both valid. The tag cannot start with a digit if you want it to be clickable? Actually, Mastodon does accept a digit as the first character after #. #2024 is a valid clickable hashtag. However, some third-party clients may not display it as a link. The official Mastodon web interface and apps handle it correctly.

Mixed case preserves display but not search

Typing #Mastodon shows a capital M in your post. Searching for #mastodon still finds that post. The search is case-insensitive. There is no way to make a hashtag case-sensitive on Mastodon. If you want people to find your tag, the exact capitalization does not matter.

Emoji inside hashtags are ignored

If you type #cat followed by an emoji, the emoji breaks the tag. #cat becomes clickable, and the emoji plus any text after it becomes plain text. You cannot create a hashtag that includes an emoji as a character. The emoji must be placed outside the hashtag.

Hashtags with apostrophes break

A tag like #dont appears as #dont because the apostrophe is disallowed. The same applies to all punctuation. Write #dont without the apostrophe, or write #do_not with underscores.

Item Allowed on Mastodon Not Allowed on Mastodon
Latin letters (A-Z a-z) Yes No limitation
Non-Latin letters (Cyrillic, Arabic, CJK) Yes No limitation
Digits (0-9 and other scripts) Yes No limitation
Underscore (_) Yes No limitation
Combining diacritical marks Yes, after a base character As the first character after #
Hyphen (-) No Breaks the tag
Period (.) No Breaks the tag
Apostrophe (‘) No Breaks the tag
Space No Breaks the tag
Emoji No Breaks the tag
Symbols ($ % & ) No Breaks the tag

You now know exactly which characters Mastodon accepts in hashtags and which ones cause a break. Check your hashtags for hyphens, spaces, and punctuation before posting. Use underscores or camel case to join words. If a hashtag does not turn blue in the compose box, edit it to remove the disallowed character. For advanced hashtag management, consider using the Hashtag Follow feature in Mastodon to follow specific tags without typing them manually.