Invisible characters are code points that take up space in a string but render nothing on screen. They sneak in through copy-paste, word processors, and even deliberate text watermarking, and they quietly break comparisons, search, and parsing. This tool removes them and tells you exactly what it found.
How it works
The stripper scans your text character by character and checks each code point against a table of known invisible and formatting characters:
U+200B Zero-Width Space U+200C/200D Zero-Width Non-Joiner/Joiner
U+00AD Soft Hyphen U+FEFF Byte-Order Mark / ZW No-Break Space
U+200E/200F LTR/RTL Mark U+202A-202E Bidi embedding/override
U+2060 Word Joiner U+00A0 No-Break Space → converted to normal space
Matched characters are removed, except the no-break space, which is replaced with an ordinary space because it normally represents intended spacing. Visible whitespace such as regular spaces, tabs, and newlines is left untouched.
Where invisible characters come from
Copy-paste from web pages and PDFs. Web content and PDF text layers frequently contain zero-width spaces as word-boundary hints for search engines or layout engines. When you copy the text, these characters come along and are invisible in most text editors.
Word processors and rich text. Microsoft Word uses the soft hyphen (U+00AD) to mark optional hyphenation break points. The character is invisible when the word is not being hyphenated, but it persists when you copy text to plain environments and silently breaks string comparison.
Byte-order marks from Excel CSV exports. When Excel saves UTF-8 CSV files on Windows, it prepends a BOM (U+FEFF) at the very start of the file. This is invisible in Excel but shows up as a garbled character when the file is opened in Python, pandas, or database loaders — typically corrupting the first column header.
AI output and text watermarking. Some text generation systems embed invisible Unicode characters as a form of fingerprinting. The watermark is designed to be undetectable to readers but recoverable by the author. If you are receiving AI-generated text and want a clean copy, stripping invisible characters removes any such encoding.
Right-to-left override attacks. The bidirectional override characters
(U+202E and similar) can make a filename or URL appear to contain one thing while
actually containing another. For example, a file named using U+202E can display
as document.pdf while the actual name is fdp.exe. Stripping these is
a basic security step for text received from untrusted sources.
Common situations where this tool prevents bugs
- String comparison failures. Two API responses look identical in your
log viewer but
===returns false; one has a U+200B after a field value. - Database unique-constraint violations. Two usernames that look the same are stored as different values because one has a trailing zero-width space.
- Search breaking. A user searches for a product name that appears in the catalogue, but the search returns no results because the catalogue entry has a soft hyphen mid-word.
- JSON parsing errors. A BOM at the start of a JSON string causes an unexpected token error even though the JSON looks valid.
Notes and example
Paste a string like hello followed by a hidden zero-width space and then
world, and the output collapses to a clean helloworld while the findings
list pinpoints the U+200B by position. Use this before comparing identifiers,
diffing text, or pasting into code, where a single invisible character can cause
a baffling mismatch. To detect look-alike rather than invisible characters, see
the homoglyph detector.