01What is Invisible Character Detector?
Some bugs are literally invisible. A pasted API key fails, a CSV column named id refuses to match, or two strings that look identical compare as different. Very often the culprit is a character with no width at all. This detector walks your text one code point at a time and flags anything in its list of invisible, formatting and control characters. The list covers the usual suspects and some rare ones. You get the zero-width space, non-joiner and joiner, the byte order mark U+FEFF, the word joiner, the soft hyphen, the no-break and narrow no-break spaces, and the typographic spaces from en quad to hair space. It also flags left-to-right and right-to-left marks and every bidirectional embedding, override and isolate, U+202A to U+202E and U+2066 to U+2069. Those are the characters behind the Trojan Source attack described in CVE-2021-42574, where code reads one way to a reviewer and another way to the compiler. Then come invisible math operators, Hangul fillers, the braille blank, the ideographic space, C0 and C1 control characters, DEL, variation selectors and the Unicode tag block U+E0000 to U+E007F. Tag characters mirror ASCII, so the tool decodes them and shows TAG A, TAG B and so on. That makes hidden text smuggled into a prompt readable again. Some characters are left alone on purpose. Tab, line feed and carriage return are normal formatting. U+FE0F, the selector that asks for emoji-style display, is skipped so a red heart doesn't trigger a warning. Each hit is listed with its position, its U+ code and its Unicode name. Positions are UTF-16 indexes, the same numbers JavaScript's indexOf returns, so a tag character outside the Basic Multilingual Plane takes two slots. Copy Cleaned gives you a fixed copy. Space-like characters such as NBSP, the em space and the ideographic space become a plain space, and everything else flagged is deleted. The footer shows the length before and after, so you can see exactly how much changed. A quick example: paste "if (a" followed by U+202E and ") {}". The list shows one entry at position 5, U+202E RIGHT-TO-LEFT OVERRIDE, and the cleaned text is "if (a) {}", one unit shorter. Limits worth knowing. The tool does not catch look-alike letters such as Cyrillic а posing as Latin a, since those are visible characters. Removing joiners can break emoji sequences and some scripts. All the checking happens in the page script on your device, and the text you paste is not sent to our server.
Developers and security reviewers chasing strings that look correct but fail comparisons, parsing or code review. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Invisible Character Detector
- Paste your text into Paste Text, or load the Zero-width, BOM or Mixed spaces example.
- Read the status line, which shows how many invisible characters were found.
- Check the Detected Characters list for each position, U+ code and name.
- Click Copy Cleaned to copy the fixed text.
- Compare the Length and Cleaned counts in the footer to confirm what was removed.
03Worked examples
- Input:
"hello" + U+200B + "world" - Result:
#5 U+200B ZERO WIDTH SPACE Cleaned: "helloworld" (11 to 10 units) - The zero width space is removed outright.
- Input:
"price:" + U+00A0 + "$5" - Result:
#6 U+00A0 NO-BREAK SPACE Cleaned: "price: $5" (9 to 9 units) - Space-like characters become a normal space, so the length stays the same.
- Input:
U+FEFF + "id,name" (CSV header saved with a BOM) - Result:
#0 U+FEFF BYTE ORDER MARK / ZERO WIDTH NO-BREAK SPACE Cleaned: "id,name" - A leading BOM is a common reason the first CSV column fails to match.
- Input:
"if (a" + U+202E + ") {}" - Result:
#5 U+202E RIGHT-TO-LEFT OVERRIDE Cleaned: "if (a) {}" - A bidi override of the kind used in Trojan Source.
- Input:
"hi" + U+E0041 + U+E0042 + "!" - Result:
#2 U+E0041 TAG A #4 U+E0042 TAG B Cleaned: "hi!" (7 to 3 units) - Tag characters are decoded to the ASCII letter they hide. Each takes two UTF-16 units.
- Input:
"x" + U+2003 + "y" + U+00AD + "z" - Result:
#1 U+2003 EM SPACE #3 U+00AD SOFT HYPHEN Cleaned: "x yz" - The em space becomes a space and the soft hyphen is removed.
04Common use cases
- Finding why an API key or environment variable copied from a chat message fails authentication even though it looks right
- Spotting a BOM at the start of a CSV or JSON file that makes the first header or key fail to match
- Reviewing a pull request diff or config file for bidirectional override characters used in Trojan Source attacks
- Checking an LLM prompt or a user-submitted string for hidden Unicode tag characters carrying instructions
- Explaining why two usernames or slugs that look identical are rejected as duplicates or as different values
- Cleaning copy pasted from Word or Google Docs that contains non-breaking and em spaces before it goes into a database
05Tips
- Positions count UTF-16 units, so after any emoji or tag character the numbers jump by two. They still match str.indexOf in JavaScript.
- Copy Cleaned keeps word gaps. A no-break space becomes a normal space instead of gluing two words together.
- The zero width joiner holds many emoji together, and the non-joiner is needed in Persian and some Indic scripts. Check the context before cleaning those.
- Subdivision flags such as England and Scotland are built from tag characters, so a tag hit next to a flag emoji is expected. Tags inside plain prose are not.
- If a git diff looks fine but behaves oddly, paste the raw file contents here rather than the rendered diff, which may already hide bidi controls.
06Related concepts
Zero-width space, Byte order mark, Unicode bidi, Trojan Source, Homoglyphs.
Frequently Asked Questions
What is Invisible Character Detector?
Invisible Character Detector is a free, browser-based developer tool on AIDToolStack. Detect zero-width and invisible chars It requires no installation or sign-up and works entirely in your browser.
Is Invisible Character Detector free to use?
Yes. No sign-up, no fees and no usage cap.
Does Invisible Character Detector store my data?
No. It runs in your browser; nothing is uploaded.