Invisible Characters Detector & Remover
Find and remove invisible characters in any text: zero-width spaces, bidi controls, hidden Unicode tag text used for prompt injection, soft hyphens, unusual spaces and more.
Unicode tag characters and long runs of variation selectors can carry text that people cannot see but language models can read. Treat it as a possible prompt injection.
| Code point | Name | Type | Count |
|---|
See the Characters You Cannot See
Text copied from web pages, PDFs, chat apps and AI tools often carries characters that take up no visible space: zero-width spaces, direction overrides, soft hyphens, no-break spaces and Unicode tag characters. They break search and string comparisons, inflate token counts, sneak into code and can hide instructions meant for a language model.
This tool scans your text, marks every invisible character with a colored badge, lists each one with its code point and count, and decodes hidden text written in Unicode tag characters. Choose what to remove or replace, then copy the cleaned text. Everything runs locally in your browser.
How to find and remove invisible characters
- Paste your text into the box, or click Load sample to see a text with several hidden characters.
- Review the results. Badges in the highlighted view show where each invisible character sits; the table lists code points, names and counts.
- Check for hidden text. If the text contains Unicode tag characters, their decoded content appears in a red box.
- Choose actions per type: remove, replace with a normal space, or keep. By default unusual spaces become normal spaces and everything else is removed.
- Copy the cleaned text.
Invisible characters the tool detects
| Type | Code points | Examples | Why it matters |
|---|---|---|---|
| Zero-width | U+200B–U+200D, U+2060, U+FEFF, U+180E, U+2061–U+2064 | Zero width space, joiner, word joiner, BOM | Breaks search, matching and URLs; used to watermark or fingerprint text |
| Bidi controls | U+202A–U+202E, U+2066–U+2069, U+200E, U+200F, U+061C | Right-to-left override | Reorders how text is displayed, as in the Trojan Source attack on code and fake file names |
| Tag characters | U+E0000–U+E007F | Tag latin letters | Invisible copies of ASCII that models can read (ASCII smuggling) |
| Soft hyphen | U+00AD | Optional hyphen | Invisible unless a word wraps; splits words for search |
| Unusual spaces | U+00A0, U+2000–U+200A, U+202F, U+205F, U+3000, U+1680 | No-break, thin, em space | Look like spaces but fail split(" ") and equality checks |
| Variation selectors | U+FE00–U+FE0F, U+E0100–U+E01EF | VS16 in ❤️ | Needed in emoji, but long runs can encode hidden data |
| Control and other | C0/C1 controls, U+034F, Hangul fillers, U+2800, U+2028/2029 | Line separator, blank braille | Break parsers and JSON, or render as blank “letters” |
Hidden prompt injection with Unicode tags
The Unicode tag block (U+E0000–U+E007F) mirrors ASCII: U+E0041 is an invisible “A”, U+E0061 an invisible “a”, and so on. Text written with these characters is invisible in most editors, browsers and chat apps, but many LLM tokenizers still turn it into tokens the model can read. Attackers use this to hide instructions in web pages, emails, documents or pasted prompts, a technique often called ASCII smuggling.
To decode, subtract 0xE0000 from each code point. This tool does that automatically and shows the result. Tag characters do have one legitimate use: subdivision flags such as the flag of England are written as U+1F3F4 followed by tags and a cancel tag. With the emoji option on, those flags are kept.
When to clean text
- Before sending text to an LLM, especially content from the web or from users, so hidden instructions cannot reach the model.
- Before saving data: names, emails and IDs with zero-width characters create duplicates that look identical. Validate training files with the JSONL Validator after cleaning.
- In code reviews, scan pasted snippets for bidi controls.
- When counting tokens, invisible characters add to the total; compare with the LLM Token Counter.
Frequently Asked Questions
Common questions about invisible and hidden Unicode characters.
Invisible characters are Unicode code points that render with no visible glyph, such as the zero width space (U+200B), word joiner (U+2060), soft hyphen (U+00AD) or direction controls. They are valid text, so they survive copy and paste.
Paste the text above and keep Zero-width characters set to Remove, then copy the cleaned text. In code, a regular expression such as /[\u200B-\u200D\u2060\uFEFF]/g with replace does the same for the most common ones.
Yes. Unicode tag characters can spell out instructions that people cannot see but a language model can read. Removing all tag characters before text reaches the model blocks this channel.
Some emoji need them: family and profession emoji use the zero width joiner, and many symbols use variation selector 16 for color. With the emoji option on, those characters are kept when they sit inside an emoji.
Some text contains zero-width or unusual space characters from the tool or website it was copied from. Their presence does not prove where the text came from, but this tool shows exactly which characters are there.
U+00A0 looks like a space but is a different character, so searches, splits and comparisons that expect a normal space fail. It is often legitimate in typography, which is why the default is to replace it with a normal space rather than delete it.
No. Detection and cleaning run entirely in your browser; nothing is sent to a server.
U+FEFF at the start of a file is a byte order mark. In the middle of text it acts as a zero width no-break space. Many JSON and CSV parsers reject a leading BOM, so it is safest to remove it.