Why You Might Need to Remove Invisible Characters
Some characters take up no space on screen but are still part of the text. A zero width space between two letters looks like nothing, yet a search for the word will miss it, a password will not match and a script may stop with an error nobody can see. If you need to remove invisible characters, the hard part is finding them, since they cannot be seen in a normal editor.
This tool scans your text and lists every hidden character it knows about. It then gives you a clean copy. You see what was there before anything is changed.
Where Hidden Characters Come From
They arrive through copy and paste more often than through typing. Web pages use them to control line breaks. Word processors and PDF files add soft hyphens and no-break spaces. Spreadsheet exports and some editors put a byte order mark at the start of a file. Mixed left-to-right and right-to-left text brings direction marks along with it.
Text copied from chat tools or other generators can also contain such characters, but whether it does depends on the source and on the particular text. Many pieces contain none. The scan tells you which case you have instead of guessing.
The Kinds of Characters This Tool Finds
- Zero width characters: zero width space (U+200B), zero width non-joiner (U+200C), zero width joiner (U+200D), word joiner (U+2060) and the invisible math operators.
- Byte order mark (U+FEFF), also called a zero width no-break space.
- Soft hyphen (U+00AD), which only shows when a line breaks at that spot.
- Direction marks and overrides (U+200E, U+200F, U+202A to U+202E, U+2066 to U+2069). An override can make text display in a different order from the order it is stored in.
- Odd spaces such as the no-break space (U+00A0), thin space and ideographic space, which look like a space but are not the plain space character.
- Control codes such as null, bell and escape. Tabs and line breaks are never touched.
- Tag characters (U+E0000 to U+E007F), blank fillers (Hangul filler, Braille blank) and, if you switch them on, variation selectors.
Each of these is a real Unicode character with its own code. The code shown in the table, such as U+200B, is the one you can search for in your own editor or code.
A Worked Example
The Sample button loads a four-line text that is 68 characters long by the browser's string length. The scan reports 7 characters removed, 1 replaced and 2 kept.
- Zero width space (U+200B), 3 times. Removed.
- Right-to-left override (U+202E), soft hyphen (U+00AD), word joiner (U+2060) and byte order mark (U+FEFF), once each. Removed.
- No-break space (U+00A0), once. Replaced by a normal space.
- Zero width joiner (U+200D), 2 times, inside a family emoji. Kept, because removing them would break the emoji into three people.
The clean text is 61 characters long. The first line becomes Invoice total: $120, with the odd space turned into a normal one, and the family emoji is still one emoji.
Options Explained
Keep joiners in emoji and scripts is on by default. The zero width joiner and non-joiner are not always junk. Emoji such as a family or a person with a profession are built with a joiner. Persian uses the non-joiner inside words, and several Indic scripts use the joiner after a virama. The tool keeps a joiner when it sits between emoji, or between letters of a non-Latin script, and removes it elsewhere. Switch the option off to remove every joiner.
Odd spaces to a normal space changes no-break and wide spaces into one plain space. That is what you want for pasted English text. It is not what you want in Chinese or Japanese text that uses the wide ideographic space on purpose, so switch it off there.
Variation selectors are off by default. The one that follows many emoji and symbols asks for the colour picture instead of the plain symbol. Remove it and a heart can turn from a red emoji into a plain black glyph. Switch the option on only when you know you have stray selectors.
Finding the Same Characters in Your Own Code
If you only need to strip the most common ones inside a script, a regular expression does it. This JavaScript line removes zero width characters and the byte order mark:
text.replace(/[\u200B-\u200D\u2060\uFEFF]/g, "");Be careful with it. It removes joiners inside emoji too, so a family emoji turns into separate people. It also says nothing about odd spaces, direction marks or control codes. For JSON strings that contain such characters as escapes, JSON Unescape shows the real characters, and the URL Decode tool does the same for percent codes.
What This Tool Does Not Do
- It does not find look-alike letters, such as a Cyrillic a that looks like a Latin a. Those are visible characters. The Text Obfuscator makes that kind of text, and this tool does not detect it.
- It does not judge who or what wrote a text. It looks at characters, not at wording.
- It cannot see a character that your browser or the app you copied from already dropped before you pasted.
- It cleans text only. Images, PDFs and Word files are not read.
Privacy
The scan runs in your browser tab. Your text is not sent to a server. The Privacy Policy describes what the site does and does not store.