A little help goes a long way. Find a tool/

Text

Zero-Width Character Cleaner

Find and remove invisible zero-width characters — U+200B, U+200C, U+200D, U+2060 and the BOM U+FEFF — that break code, search and diffs. Shows exactly what was removed, with positions.

YOUR WORKSPACEFree to use. No sign-up.
—
Paste text above, then press Clean text.

Deep dive guides

A LITTLE CONTEXT · 3 MIN READZero-Width Characters: Invisible Text With Real Consequences

How zero-width character cleaner works

Zero-width characters are real Unicode code points with no visible glyph: the zero width space (U+200B), zero width non-joiner (U+200C), zero width joiner (U+200D), word joiner (U+2060) and the byte-order mark (U+FEFF), which behaves as an invisible no-break space anywhere except the very start of a file. They travel invisibly inside copy-pasted text and then cause very visible problems: identifiers that fail equality checks, search terms that match nothing, diffs that show phantom changes and hashes that no longer match.

This cleaner scans your text code point by code point, counts every hit of each zero-width character, records the first 100 positions where they occur, and strips them. You get the cleaned text ready to copy, a per-character breakdown showing exactly what was removed, and the byte-length savings — because U+FEFF costs three bytes in UTF-8 and the others cost three bytes too, the file gets smaller as well as cleaner.

Paste text copied from web pages, chat apps, PDFs or word processors and it reports honestly: found nothing means the text was already clean. Note that the zero width joiner is a legitimate part of emoji sequences like the family or rainbow-flag emoji, so if your text depends on those, do not clean it — the tool is for prose, code and data, not emoji art.

Frequently asked questions

What are zero-width characters, exactly?
Unicode characters with no visible glyph but a real code point and real bytes. U+200B is a break opportunity with no width, U+200C and U+200D join or separate letters in scripts like Arabic and Devanagari, U+2060 prevents line breaks, and U+FEFF is the byte-order mark. They are valid, useful characters — just invisible, which is why stray ones cause so much confusion.
How do invisible characters break my code or search?
A variable name that prints identically but contains U+200B is a different string, so lookups fail. A search for “dance” fails if the pasted text contains da​nce. Git shows a change with no visible difference, line counts drift, and hashes or signatures stop matching. Tests fail with messages that look impossible until someone hex-dumps the string.
Is it safe to remove all of them?
In prose, code and data, yes — they serve no purpose there and are almost always copy-paste contamination. The one exception is text that relies on them deliberately: emoji sequences joined by U+200D, justified Arabic text using U+200C, and text fingerprinted or watermarked with U+200B patterns. If any of those apply, keep the characters.
Can these characters be used maliciously?
Yes. Zero-width characters have been used to watermark leaked documents, fingerprint text per recipient, and smuggle invisible content past human review — security researchers call the family typographic homoglyph attacks when mixed with lookalike letters. Cleaning pasted text before it reaches code, databases or prompts is a sensible habit.
Does this fix every invisible-text problem?
No. It removes the zero-width family listed above. It does not touch direction marks (U+200E/U+200F, U+202A–U+202E), soft hyphens (U+00AD), or homoglyph substitutions where a real letter like Cyrillic а replaced Latin a — those are different characters with visible-width siblings, and they need targeted detection.