Skip to main content

Hidden Characters

Remove Invisible Characters from Text

CleanPastedText editorial · Updated

Text workbench

Try it on your text

Cleaning mode

Removes hidden characters and standardizes AI-style punctuation.

Try a real example

Each sample contains a problem you cannot see.

Original

Pasted text

0 chars · 0 words

Cleaned

Ready to copy

0 changes

Text stays in this browser

Same words · No AI rewriting · No content logging

Why are there invisible characters in my text?

Invisible characters creep into text whenever you copy from PDFs, web pages, Word, Excel — or AI chatbots like ChatGPT. Characters such as the zero-width space (U+200B), soft hyphen (U+00AD), and bidirectional control marks have no visible glyph, but they are real characters to every computer program. They break search, spellcheck, code, and formatting the moment you paste them somewhere new.

Most were designed for typesetting — telling a layout engine where it may break a long word, or which direction mixed Arabic/English text should flow. Outside that context they are pure baggage: they make "helloworld" unfindable in search, trip up markdown parsers, and trigger mysterious syntax errors in code. The direction-switching family is the most consequential of the group, because it can make source code read differently to a human than it does to a compiler — it has its own guide on how to remove BiDi control characters.

Common invisible characters this tool removes

U+200B

Zero Width Space (ZWSP)

Marks a potential word boundary. Invisibly joins words, breaking search and spellcheck.

U+FEFF

Byte Order Mark (BOM)

A file-encoding marker that shows up as a ghost character when pasted into web apps.

U+200E / U+200F

Directional Marks (LRM/RLM)

Switch text direction between left-to-right and right-to-left. Cause cursor glitches and flipped punctuation.

U+00AD

Soft Hyphen

An invisible hyphenation hint from PDFs and justified layouts that pollutes plain text.

U+2060

Word Joiner

Prevents line breaks without any visible width — a frequent stowaway in copied text.

U+202F

Narrow No-Break Space

A thin, non-breaking space, known for a brief April 2025 appearance in o3 and o4-mini output — nearly indistinguishable from a normal space.

Two of these have pages of their own: U+200B is covered in depth by the zero-width space remover, and U+202F is the character at the centre of the ChatGPT watermark characters story. For the complete table of every character we detect — including Unicode tag characters and variation selectors — see the full invisible Unicode characters list.

How to remove invisible characters (3 steps)

  1. Paste your text into the cleaner at the top of this page. Detection runs instantly and locally.
  2. Check the "What changed" report. It lists exactly which hidden characters were found, by name and code point — so you can verify what was in your text. If you would rather inspect a passage without altering it, the AI watermark checker reports the same findings and leaves the original text untouched.
  3. Copy the cleaned output. The visible text is identical; only the invisible baggage is gone.

Unlike find-and-replace, the cleaner targets the specific Unicode ranges assigned to format and control characters, so it catches variants you'd never think to search for — while leaving legitimate characters (including emoji and non-Latin scripts) intact in the default preset. Non-breaking spaces are a slightly different case — they are real, visible-width spaces rather than zero-width ones — and the non-breaking space remover covers U+00A0 and its narrow U+202F relative in detail.

Common questions

Frequently asked questions

How do I remove invisible characters from text?

Paste the text into a Unicode cleaner like CleanPastedText. It scans every code point, counts hidden characters such as zero-width spaces (U+200B), byte order marks (U+FEFF), and soft hyphens (U+00AD), and returns the same text with those characters stripped. Manual removal isn't practical because the characters have no visible glyph.

Why does my text contain invisible characters?

They usually arrive via copy-paste from web pages, PDFs, Word, Excel, or AI chatbots like ChatGPT. Layout engines and generators insert zero-width spaces, non-breaking spaces, and soft hyphens for line-breaking control, and those characters travel with the text when you copy it.

Can invisible characters break my code?

Yes. A zero-width space or BiDi control character inside source code can cause syntax errors, failed string comparisons, or misleading code review diffs — the 'Trojan Source' class of bugs. Cleaning pasted snippets before committing them avoids this.

Is it safe to paste sensitive text into this tool?

Yes. CleanPastedText is 100% client-side JavaScript: the text is processed in your browser's memory and never uploaded, logged, or stored. You can even load the page, disconnect from the internet, and keep using it.

Does ChatGPT put invisible characters in its answers?

Not deliberately, as far as anyone has documented. The one clear episode was April 2025, when the startup Rumi reported that OpenAI's o3 and o4-mini models were inserting narrow no-break spaces (U+202F) into longer outputs; OpenAI called it 'a quirk of large-scale reinforcement learning' rather than a watermark, and the characters disappeared within days. Invisible characters still reach AI text regularly through the chat interface's HTML and through Word, Docs, and PDF copy pipelines, and a remover strips every format and control character it detects.

Continue reading

Related guides & tools