FormatterHQ

Invisible Character Detector & Remover

Paste text to reveal hidden characters — zero-width spaces, non-breaking spaces, byte-order marks, direction overrides — see exactly where they are, and remove or escape them.

Input TEXT
Output TEXT
Ready.

How to use the Invisible Character Detector & Remover

  1. Paste the suspicious text into the input editor.
  2. Click Detect: the preview lists each hidden character with code point, name, count and position, and shows the text with visible markers.
  3. Click Remove invisible characters to clean the text, or Escape as \u codes to make them visible in code.
  4. Copy or download the cleaned text.

Find hidden characters with the invisible character detector

Some Unicode characters take up no visible space. They sneak into text copied from web pages, PDFs, chat apps and word processors, and cause problems that are maddening to debug: a password that "does not match", a JSON key that is not found, a CSV column that never equals the expected value, or code that fails to compile with an "unexpected character" error. This invisible character detector shows every such character, where it is and what it is called.

Characters it finds

CharacterCode pointTypical source
Zero width space (ZWSP)U+200BWeb pages, CMS editors, chat apps
No-break space (NBSP)U+00A0Word processors, HTML  
Byte order mark (BOM)U+FEFFFiles saved as "UTF-8 with BOM" on Windows
Zero width joiner / non-joinerU+200D / U+200CEmoji sequences, Indic and Arabic scripts
Left-to-right / right-to-left marks and overridesU+200E, U+200F, U+202A–U+202E, U+2066–U+2069Mixed-direction text; also used to disguise file names
Other spacesU+2000–U+200A, U+202F, U+3000Typography, CJK text
Soft hyphen, word joiner, tag and variation selectors, control charactersvariousCopy-paste, legacy encodings

Detect, remove or escape

  • Detect lists each character type with its count and the line and column of its first occurrence, and renders the text with small yellow markers (ZWSP, NBSP, BOM…) in place of the hidden characters.
  • Remove deletes zero-width and control characters, turns special spaces into normal spaces (if you untick that option, they are deleted instead) and converts line/paragraph separators into line breaks. Zero-width joiners inside emoji such as 👨‍👩‍👧 are kept so the emoji do not fall apart.
  • Escape replaces each hidden character with its JavaScript escape (\u200B), which is useful for making them visible in source code or test fixtures.

Security note: bidi overrides

The right-to-left override (U+202E) reverses the display order of the following text. It has been used to disguise file names — invoice[U+202E]fdp.exe can look like invoiceexe.pdf — and in "Trojan Source" attacks that make source code appear different from what compilers see. Treat unexpected direction controls in code or file names as a red flag.

To inspect every character of a string in detail, use the Unicode character inspector. For general clean-up such as collapsing spaces, try remove extra spaces.

Where hidden characters come from

Rich-text editors insert non-breaking spaces to keep words together, websites add zero-width spaces to allow line breaks in long words, and Windows tools write a byte order mark at the start of UTF-8 files. Messaging apps and some AI chat interfaces also produce text with unusual spaces. Copying such text into code, configuration files, spreadsheets or form fields carries the characters along unnoticed.

Privacy

The tool runs entirely in your browser. Nothing you type or paste is sent to our servers.

Frequently asked questions

How do I remove zero-width spaces from text?
Paste the text and click Remove invisible characters. Zero-width spaces, BOMs and similar characters are deleted, while special spaces become normal spaces.
Why does my string comparison fail although the text looks identical?
One of the strings probably contains an invisible character such as a zero-width space or a non-breaking space. Detect shows exactly which one and where.
Will removing invisible characters break emoji?
No. Zero-width joiners and variation selectors that belong to emoji sequences are kept, so family and flag emoji stay intact.
What is a BOM and should I remove it?
A byte order mark (U+FEFF) at the start of a file signals UTF-8 or UTF-16. It is unnecessary in UTF-8 and can break scripts, CSV headers and JSON parsers, so removing it is usually safe.

Last updated October 3, 2026

Related tools