When you type a hashtag in a Mastodon post, the character limit applies to the entire post, including the # symbol and all letters in the tag. If your hashtag exceeds a certain length, the post may fail to send or the tag may be truncated. Mastodon enforces a maximum character length for individual hashtags to prevent spam and keep timelines readable. This article explains the exact limit, why it exists, and how to work around it when you need longer tags.
Key Takeaways: Mastodon Hashtag Character Limits
- Maximum length per hashtag: 512 characters total, including the # symbol and any spaces or punctuation if encoded.
- Post character limit: 500 characters by default on most instances, so a long hashtag reduces room for the rest of your message.
- Workaround with plain text: Replace the hashtag with a plain text keyword or phrase to avoid the limit entirely.
Why Mastodon Enforces a Hashtag Character Limit
Mastodon uses the ActivityPub protocol, which defines a maximum length for hashtag URIs. The Mastodon server implementation sets a hard limit of 512 characters for the entire hashtag string, including the # symbol. This limit prevents extremely long tags from bloating the database and slowing down federated delivery.
In practice, the effective limit is often much shorter because the post itself has a 500-character limit on most instances. If your hashtag is 400 characters, you only have 100 characters left for the rest of the post. Some instances allow custom post lengths up to 1000 or 2000 characters, but the hashtag limit remains at 512.
How the Limit Affects Federated Posts
When a post with a long hashtag is sent to another Mastodon server or a compatible platform like Pleroma, the receiving server must parse the hashtag and store it. If the hashtag exceeds 512 characters, the receiving server may reject the entire post or silently truncate the tag. This can cause the post to appear without the hashtag on some servers.
Character Count Rules
The 512-character limit counts every character in the hashtag, including the # symbol, letters, numbers, underscores, and any other characters. Mastodon does not count spaces or punctuation inside a hashtag because those characters split the tag. If you include a space, the tag ends at the space. The limit applies to the complete tag string as it appears in the post.
How to Check and Work Around the Hashtag Limit
If you need a hashtag longer than 512 characters, you have three options: shorten the tag, use multiple shorter tags, or replace the hashtag with plain text. Follow these steps to create a post that works within the limit.
- Count the characters in your hashtag
Open a text editor or character counter tool. Type the full hashtag including the # symbol. Count every character. If the count exceeds 512, the tag will be rejected or cause a post failure. - Shorten the hashtag
Remove unnecessary words or use abbreviations. For example, change #InternationalConferenceOnArtificialIntelligence2024 to #ICAI2024. Keep the core meaning so users can still find the tag. - Split into multiple shorter hashtags
Break the long tag into two or three shorter tags. For example, use #Conference2024 and #ArtificialIntelligence instead of one long tag. Each tag stays under 512 characters, and users can click each one to see related posts. - Replace the hashtag with plain text
If the tag is not essential for discovery, write the phrase as plain text without the # symbol. For example, write “International Conference on Artificial Intelligence 2024” instead of a hashtag. This bypasses the limit entirely. - Test the post before sending
Paste the post into the Mastodon compose box. If the server shows an error about character limits or the hashtag is truncated, go back to step 2 or 3. Send a test post to a private account first if you are unsure.
What Happens When You Exceed the Limit
If you try to post a hashtag longer than 512 characters, the Mastodon server may return an error message saying the post is too long or the hashtag is invalid. Some client apps truncate the hashtag silently, which can break the tag and cause it to appear as plain text. Other apps may refuse to send the post at all.
Post Fails to Send After Adding a Long Hashtag
This is the most common symptom. You compose a post, add a long hashtag, and the Send button does nothing or shows an error. The fix is to shorten or replace the tag as described in the steps above.
Hashtag Appears as Plain Text on Other Servers
If the hashtag is truncated during delivery, it may lose the # symbol and appear as regular text. Users on other instances cannot click the text to search for related posts. To avoid this, keep the tag short enough to survive federation.
Search Results Do Not Include Your Post
When a hashtag is truncated or rejected, Mastodon does not index the post under that tag. Your post will not appear in search results for the tag. Use shorter, standard tags to ensure discoverability.
| Item | Hashtag | Plain Text |
|---|---|---|
| Character limit | 512 characters including # | No limit beyond post length |
| Clickable to search | Yes, if under limit | No |
| Works with federated servers | Yes if under 512 chars | Yes |
| Best use case | Short, common tags | Long proper names or phrases |
Mastodon limits individual hashtags to 512 characters to keep posts manageable and ensure reliable federation. You can work around this limit by shortening the tag, splitting it into multiple tags, or using plain text. Always test a long tag before sending to a public audience to confirm it appears correctly on other servers. For maximum compatibility, keep hashtags under 30 characters, which is the length that most Mastodon instances display without truncation in the timeline.