Rich text facet builder
Mentions, links and hashtags with their byte offsets.
Type a post to see its mentions, links and hashtags with their UTF-8 byte ranges, resolve the mentions to DIDs, and copy the facets, the record or the code to post it. Or paste facets to check them.
How it works
A Bluesky post is plain text. Its mentions, links and hashtags are facets: a list next to the text that says which bytes of the text are a mention of which DID, a link to which address, or a tag. The ranges count bytes of UTF-8 text, not characters: an emoji or an accented letter before a link moves every offset after it.
The builder detects facets with the same rules as the Bluesky app and its official library: links with or without https://, final punctuation left out, hashtags that are not only digits, mentions of real handles. It shows each range, and resolves the mentions to their DIDs when you ask.
The text stays in your browser. Only the handles you choose to resolve are sent to Bluesky’s public API. The validate mode checks facets you wrote yourself: ranges inside the text, on character boundaries, not overlapping, with valid values.
Questions
- Why are facet offsets in bytes?
- The AT Protocol counts positions in the UTF-8 encoding of the text, so that every language and library agrees. JavaScript strings count UTF-16 code units and Python counts code points: both give other numbers as soon as the text has an emoji or a letter outside ASCII.
- Why does my mention not link?
- A mention facet holds the account’s DID, not its handle. If the handle does not resolve, there is no DID to put in the facet, and the mention shows as plain text. The builder flags these handles.
- Do I need to add facets for hashtags?
- Yes. Bluesky does not detect anything on its own when a post is created through the API: without a tag facet, a hashtag is plain text and is not searchable as a tag.
Documentation
Related tool
Post character counter
Count your post the way Bluesky does.
Also useful:Post and thread viewer
See all the tools