27 September 2026 · 1 min read
How to remove invisible characters from text
Paste the text into a scanner and copy the cleaned version back out, or strip them yourself with one regex — and know what removing them doesn't fix.
Paste the text into the AI text detector and copy the cleaned version back out. It deletes the genuinely invisible characters — zero-width spaces and joiners, the byte-order mark, bidirectional controls, tag characters, variation selectors — and turns unusual spaces like the non-breaking space into ordinary ones. The scan runs in your browser, so nothing is uploaded.
The cleaned text reads identically, which is the point. These characters have no appearance, so removing them changes nothing you can see and fixes what they break: imports that fail, e-book formatting that goes wrong, a search that won't match a word with a zero-width space sitting in the middle of it.
Removing them by hand
Any editor whose find-and-replace does regular expressions will do it. In VS Code, turn the regex option on, search for [-] and replace with nothing. That covers the common zero-width set; some editors want the \x{200b} form of each codepoint instead. Google Docs can match them too, under "match using regular expressions" in find and replace.
The catch with doing it by hand is that you can't see what you removed, or what you missed, so scan the result afterwards.
Two things people try that don't work: "paste as plain text" and "clear formatting". Both of those deal with formatting. An invisible character is a character, so it survives both.
What removing them doesn't do
It doesn't remove a model's watermark. The statistical watermarks Google and Anthropic have described live in word and token choice, not in stray characters, so deleting Unicode leaves them untouched. A "watermark remover" that works by cleaning characters cannot do the thing it's named after.
It also doesn't settle who wrote the text. Invisible characters mean the text passed through software that inserts them — an AI assistant, a word processor, a CMS, a PDF export, a copy-paste from a web page. Finding none means nothing at all in either direction. Here is what actually exists.
Check something yourself
Every tool here runs in your browser and is free. See what your files and text actually carry.