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.

Remove one specific invisible character

Each character behaves differently and has a different safe way to remove it. Start from the one you found:

Or start from where the text came from: PDF, Word, Google Docs, Excel, Outlook, Copilot or Perplexity.

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.

How do I remove zero-width characters from text?

Paste the text into CleanPastedText and copy the result. It removes the zero-width family: the zero-width space (U+200B), word joiner (U+2060), and the zero-width joiner and non-joiner (U+200D, U+200C, kept where a script or emoji needs them). In code, a pattern such as [\u200B\u2060\uFEFF] with a global replace covers the common ones.

How do I remove invisible characters from AI text?

Paste the AI output into the cleaner. It strips hidden characters that arrive through the chat page, Word or PDF copy, and reports each one by name. Character removal does not touch statistical watermarks, which work through word choice and add no characters, and it does not change how AI detectors score the text.

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

Remove hidden characters from ChatGPT text

Clean hidden characters and unusual spaces from copied ChatGPT text. See what was changed and understand why Unicode cleanup cannot verify or remove every watermark.

ChatGPT Hidden Characters: What They Are and How to See Them

Which hidden and special characters ChatGPT really outputs — U+202F, non-breaking spaces, smart quotes — why they appear, and 4 ways to make them visible.

Invisible Unicode Characters: The Complete List

The complete table of invisible Unicode characters: zero-width spaces, U+202F, BiDi controls, tag characters, variation selectors — and why each one matters.

Remove BiDi & Directional Control Characters

Strip hidden U+200E, U+200F and other directional control characters that flip your text or cause cursor glitches. Sanitize text for code and documents.

Zero Width Space Remover (U+200B)

Stop weird spacing and broken search results. Instantly identify and delete hidden zero-width spaces (U+200B) from your text for a clean paste.

How to Sanitize Copied Text for Code, JSON & CSV

Sanitize copied text for code, JSON, CSV, forms, or databases. Remove invisible Unicode and normalize risky characters locally, with a full report.

Zero Width Non-Joiner (U+200C)

What the zero-width non-joiner (U+200C) does, why Persian and Indic text need it, and how to strip it from other text without breaking those words.

The Regex That Actually Removes Invisible Unicode Characters

Copy-paste regex to strip zero-width spaces, BOMs, and invisible Unicode characters in JavaScript and Python — and why \s and a bare \p{Cf} both miss cases.

Hidden Characters and Screen Reader Accessibility

Do hidden Unicode characters break screen readers? What WCAG's own failure techniques (F32, F33) and accessibility research say, and how to check your text.

Narrow No-Break Space (U+202F)

U+202F is a narrow no-break space. See where it comes from (French text, time formats, ChatGPT in 2025), what it breaks, and how to replace it with a normal space.

Soft Hyphen (U+00AD)

The soft hyphen (U+00AD) is invisible until a word wraps. Learn why it breaks search and copy-paste, where it comes from, and how to remove it.

Zero Width Joiner (U+200D)

The zero-width joiner (U+200D) glues emoji into one symbol and shapes Indic text. Learn when it is safe to remove and how to keep emoji intact.