Invisible Character Detector

Reveal and remove zero-width spaces, direction controls and other hidden Unicode characters.

About Invisible Character Detector

An invisible character detector shows the zero-width spaces, direction controls and other hidden Unicode characters in pasted text, and removes them.

How to use

  1. Paste the text, up to 2,000,000 characters.
  2. Read the Revealed view: each invisible character is replaced by a labelled marker such as ZWSP or NBSP. Hover over a marker for its code point and name.
  3. Read the Found table: one row per character with its Unicode name, code point, kind, count and the line:column where it first appears.
  4. Tick "Show tabs" or "Show line endings (CR, LF)" to mark those as well.
  5. Choose whether unusual spaces become a normal space or are removed, then copy the Cleaned text or download it as cleaned.txt.

What it does

  • Zero-width and formatting characters: zero-width space, non-joiner and joiner, word joiner, the byte order mark (U+FEFF), soft hyphen, combining grapheme joiner, Mongolian vowel separator, the invisible mathematical operators and the interlinear annotation marks.
  • Spaces: no-break and narrow no-break space, every space from U+2000 to U+200A, ideographic space, Ogham space mark, medium mathematical space, line and paragraph separators, the Hangul fillers and the blank Braille pattern.
  • Direction controls: the marks LRM, RLM and ALM, the embeddings LRE and RLE, the overrides LRO and RLO, the isolates LRI, RLI and FSI, and the terminators PDF and PDI. A warning appears when an embedding, override or isolate is present.
  • Tag characters (U+E0000 to U+E007F), each shown with the ASCII character it mirrors, so hidden text can be read off the markers.
  • Variation selectors VS1 to VS256 and the Mongolian free variation selectors.
  • Control characters: the C0 and C1 codes and DEL. Tabs, carriage returns and line feeds are reported only on request.
  • Ordinary uses are counted separately and left alone: a joiner between two emoji, a variation selector after an emoji, keycap digit or Han character, joiners between letters of Arabic-script languages such as Persian and of the main Indic scripts, zero-width spaces between Thai, Lao, Khmer or Myanmar letters, and the tag characters inside a flag emoji. Tick "Also mark and remove characters in ordinary use" to treat them like the rest.
  • Positions are line:column starting at 1, with columns counted in Unicode code points, so an emoji is one column and a combining accent is a column of its own. A line ends at LF, CRLF or a lone CR.
  • The cleaned copy drops everything flagged. Unusual spaces become a normal space (line and paragraph separators become a line feed) or are removed, as you choose. Tabs and line endings are never changed.
  • Limits: the Revealed view shows the first 100,000 characters or 5,000 markers. The table and the cleaned copy cover the whole text.
  • It does not detect look-alike letters (a Cyrillic "а" in place of a Latin "a"), normalise Unicode, or flag ordinary spaces at the ends of lines.

Example

Input, with U+200B after "user" and U+00A0 before "km":
username 10 km

Revealed:  user[ZWSP]name 10[NBSP]km
Found:     ZWSP  ZERO WIDTH SPACE  U+200B  count 1  first at 1:5
           NBSP  NO-BREAK SPACE    U+00A0  count 1  first at 1:13
Cleaned:   username 10 km

Privacy

The scan runs in the browser. No request is made with the text, and nothing is stored.

Frequently asked questions

What is a zero-width space?
U+200B, a character with no width that marks a place where a line may break. Most editors do not show it, but it is still part of the text, so two strings that look identical can compare as different.
How do I remove invisible characters from text?
Paste the text and copy the Cleaned output. Zero-width characters, direction controls, tag characters and control codes are removed, and unusual spaces are replaced with a normal space or removed. Joiners that hold an emoji together are kept unless you ask otherwise.
Why does copied text contain hidden characters?
Word processors, web pages and chat applications insert them for layout: no-break spaces to keep words together, soft hyphens for hyphenation, zero-width joiners inside emoji and direction marks around right-to-left text. They survive copy and paste.
What is a bidirectional override attack?
Unicode direction controls such as U+202E can make a line of source code display in a different order from the one the compiler reads, hiding what it does from a reviewer. The technique was published in 2021 as Trojan Source (CVE-2021-42574).