Zero-width space remover
Text copied from a web page, a PDF or a chatbot often carries characters you cannot see: zero-width spaces that break string comparisons, non-breaking spaces that survive a trim(), and bidirectional controls that can make source code read differently to a human than to a compiler. This highlights every one of them and lets you decide what to strip.
also rewrite typography
| code point | name | count | action |
|---|---|---|---|
| U+200B | ZERO WIDTH SPACE | 1 | |
| U+00A0 | NO-BREAK SPACE | 1 | |
| U+00AD | SOFT HYPHEN | 1 |
Technical Guide & Mechanics
The Hidden Impact of Invisible Unicode in Modern Codebases
Invisible Unicode code points—such as zero-width spaces (U+200B), zero-width non-joiners (U+200C), soft hyphens (U+00AD), and left-to-right/right-to-left marks (U+200E, U+200F)—frequently enter codebases through copy-pasting from styled documentation, PDF specifications, rich-text communication tools, or AI assistants. While completely invisible to human eyes in most text editors, these characters remain distinct binary bytes in source code.
In software engineering, these hidden characters frequently cause cryptic bugs: string equality checks fail ('key' !== 'key\u200b'), regex lookups miss expected tokens, SQL identifier collisions occur, and command-line shell scripts report unexpected syntax errors. More critically, security researchers have demonstrated 'Trojan Source' attacks (CVE-2021-42574), where bidirectional control characters change visual rendering order to conceal malicious logic from code reviewers.
This utility systematically scans every character in your pasted text, identifying its Unicode General Category, hexadecimal code point, and security risk level. It strips problematic control codes while safely retaining legitimate language characters (such as Arabic glyph joiners) and multi-part emoji sequences unless otherwise instructed.
how to use it
- 01Paste the text you want to inspect.
- 02Review the highlighted characters and their code points.
- 03Adjust what gets removed, then copy the cleaned output.
questions
- Will this break emoji?
- Not by default. Zero-width joiners inside an emoji sequence are what hold a family or a flag together, so they are kept unless you explicitly opt in to stripping them.
- Is my text sent anywhere?
- No. The scan runs in your browser and the text never leaves the page.
- What causes zero-width spaces in copied text?
- Modern websites frequently insert zero-width spaces for hyphenation hints, text tracking, or word-break wrapping points in mobile viewports.
- How do zero-width spaces break JSON or SQL queries?
- In databases and JSON keys, a zero-width space is treated as a distinct binary byte. Two strings that look identical to human eyes will fail strict equality tests.