AI Text Cleaner · Guide
Remove Zero-Width Characters from Text
Last updated: August 28, 2026
Zero-width characters are the invisible contamination AI text picks up during copy-paste. They don't show on screen, but they break search, regex and string comparisons. Here's how to detect and remove them — without breaking your emoji.
What are zero-width characters?
- Zero-width space (U+200B) — an invisible space; the most common offender in AI output
- Zero-width joiner (U+200D) — joins characters; needed for emoji like 👨👩👧👦, junk elsewhere
- Zero-width non-joiner (U+200C) — prevents joining
- Word joiner (U+2060) — invisible, prevents line breaks
- BOM (U+FEFF) — often appears at the start of copied text
Where they come from
Chat interfaces, PDFs and some editors silently insert zero-width characters. AI platforms add their own formatting layer, and the copied result frequently carries U+200B or U+FEFF you can't see. The text looks fine — until a search query, a regex or a database constraint fails mysteriously. Zero-width characters are part of the wider invisible-character family — see the full invisible character remover →
The emoji trap in zero-width removal
Zero-width joiners are a special case: they're invisible characters, but they're also what keeps multi-part emoji together. A blunt remover strips U+200D everywhere and 👨👩👧👦 collapses into 👨👩👧👦. ClearPaste removes zero-width characters except the joiners inside emoji sequences — so your text is clean and your emoji survive.
How to remove zero-width characters
- Paste your text into the cleaner above.
- On the homepage tool, hit Reveal hidden to see each ZWSP/ZWJ/BOM labeled in place.
- Copy the clean text — it's ready for search, code or your CMS.
Everything runs in your browser. Your text never leaves your device.
Need to see what's hidden?
The homepage tool has a reveal view that labels every hidden character in place.
Open the AI Text CleanerThe five zero-width characters you'll actually meet
U+200B and U+FEFF are the ones that cause almost all the practical problems. The joiner (U+200D) is special: it's a legitimate part of emoji, so ClearPaste keeps it where it belongs.
How to spot them before you remove them
- Reveal hidden on the ClearPaste homepage labels each one in place — ZWSP, ZWJ, BOM, SHY, LRM and the rest.
- Regex —
/[\u200B\u200C\u200D\u2060\uFEFF]/gfinds the common set in any text editor that supports regex search. - A hex editor or an online codepoint inspector — paste a suspicious string and look for characters with no visible glyph.
The tell: if a string looks identical but behaves differently (search, regex, comparison), zero-width characters are the first suspect.
What breaks when you leave them in
- Exact-match lookups — an ID or email copied from a chat window with a hidden U+200B won't match the database row.
- Length limits — a field that rejects "too many characters" may actually be counting invisible ones.
- Analytics and deduplication — the same content stored with and without hidden characters becomes two rows, two tags, two URLs.
Zero-width characters are the most common piece of the wider invisible-character problem — see the full remover →
Frequently asked questions
What is a zero-width space (U+200B)?
A Unicode character that takes up no visible space. It's invisible when reading but exists in the data, and it breaks search, regex and string matching.
How do I detect zero-width characters?
Paste the text into ClearPaste and use the reveal view — every zero-width character is highlighted and labeled with its codepoint. The inspector also shows the total count.
Will removing zero-width joiners break emoji?
Only if the tool is blunt. ClearPaste preserves zero-width joiners inside emoji sequences, so 👨👩👧👦 stays intact while stray zero-width characters are removed.
Why does my text have zero-width characters?
They're usually inserted during copy-paste from chat interfaces, PDFs or editors. AI platforms also add their own formatting layer to generated output.
Is a zero-width character the same as an AI watermark?
No. Zero-width characters are formatting artifacts. Statistical AI watermarks are embedded in how text is generated, not in its characters. See the difference →