Find and Remove Hidden Characters in AI Text

Free

Find and remove hidden characters in AI and pasted text

How this works

About Invisible Character Finder

Paste text from ChatGPT, another AI tool, a web page or a PDF, and this finds every character you cannot see - zero-width spaces, non-breaking and narrow no-break spaces, a byte-order mark, mixed line endings - by line and column, then gives you a cleaned copy. Free, no signup, and nothing you paste leaves your browser.

Takes
Any text - AI output, a config line, two strings, or a whole file
Returns
Every hidden character with its position, plus the line-ending style
Handles
Zero-width and bidi controls, odd spaces, BOM, tabs and trailing space
Privacy
Runs in your browser - nothing you paste is uploaded

Nothing you type leaves this page

This tool runs entirely in your browser. Nothing you type or paste is sent to Revquix or to anyone else, no account is needed, and the page keeps working with your network disconnected.

Full detail in our privacy policy and AI policy.

Hidden characters in ChatGPT and AI text

Text copied out of ChatGPT and other AI chat tools can carry characters that look like ordinary spaces and are not: non-breaking spaces, the narrow no-break space (U+202F), sometimes a zero-width character. They are invisible on the page and very visible to a search box, a spreadsheet formula, a form validator or a word count. Paste the text here to see exactly which ones are present, rather than assuming.

The two bugs this exists for

The first is a diff that shows every line as changed when nothing has changed. One side has Windows line endings and the other has Unix ones, and the difference is a byte per line that no editor renders. No diff tool tells you unless you already suspected it.

The second is two strings that look identical while an equality check returns false. One of them contains a zero-width space, a non-breaking space or a soft hyphen - almost always because it was copied out of a rendered web page, a PDF or a spreadsheet. The comparison is correct and the eye is wrong, which is an unusually frustrating place to be.

Both are five-minute bugs once you know and multi-hour bugs until you do. Closing that gap is the whole point of the tool.

Located, not just counted

Reporting that a string contains one zero-width space leaves you to find it. Every finding here carries a line, a column and a count, because locating it is most of the work - and each one is labelled with what it actually does to your program rather than just its code point.

  • Zero-width spaces, joiners and byte-order marks, which break equality and trimming
  • Non-breaking and typographic spaces, which look exactly like an ordinary space
  • Bidirectional controls, including the overrides used in Trojan Source attacks
  • Line-ending style, with the counts when a file is mixed
  • Trailing whitespace and tabs, reported by line

Severity is real, not decorative

A zero-width joiner inside an emoji sequence is expected and harmless. The same character in an identifier is a defect. A right-to-left override in source code you did not write is a finding worth escalating, because it can make code display in an order different from the one the compiler reads - which is the basis of the Trojan Source class of attacks.

So findings are ranked rather than listed flat, and each one says what it means in context.

What it deliberately does not do

The cleaned output is offered, never applied. Normalising line endings, stripping zero-width characters and trimming trailing whitespace is what most people want, and rewriting a file on their behalf is not this tool’s job - identifying what is wrong with it is.

Tabs are reported and left alone, because a tab is a real indentation style rather than a defect, and silently converting them would impose a convention nobody chose.

It also cannot tell you whether a character was intended. A zero-width non-joiner is meaningful in Persian and Hindi text and almost never meaningful in a variable name; the tool flags it and you decide.

And it does not detect AI-written text. It reports characters, not authorship, and it leaves visible punctuation such as dashes and curly quotes exactly as it found them.

FAQ

Questions people actually ask

The ones that come up before somebody pastes anything in.

How do I remove hidden characters from ChatGPT text?

Paste the text into the box. Every hidden character is listed with its name, count and first position, and the cleaned copy beside it has non-breaking and typographic spaces turned into ordinary spaces, zero-width and bidirectional characters and a byte-order mark removed, line endings normalised and trailing spaces trimmed. Copy that version back.

Does ChatGPT add hidden characters to its text?

Its output can contain characters that look like ordinary spaces but are not, such as a non-breaking space or the narrow no-break space (U+202F), and copying from any rendered page can bring zero-width characters along too. Whether a particular answer has them varies, so check the text you actually have: this tool reports what is there rather than guessing.

Will removing hidden characters make AI text undetectable?

This tool makes no such claim. It finds and removes characters; it does not detect AI-written text, and it does not change a single visible word, dash or quote. What an AI-detection tool looks at is outside anything this page measures, so treat it as a text cleaner, not a way past a detector.

Why does my diff show every line as changed?

Almost always mixed line endings. If one side uses carriage-return-plus-newline and the other uses newline alone, every line differs by one byte that no editor renders. Paste either side here and the line-ending style is reported immediately, including the counts when a single file contains both.

Two strings look identical but the comparison fails. What is going on?

One of them almost certainly contains a character you cannot see - most often a non-breaking space, a zero-width space or a soft hyphen, picked up by copying from a rendered page, a PDF or a spreadsheet. Paste both and the tool locates the character by line and column.

Is a zero-width character always a bug?

No, and the tool ranks findings rather than listing them flat. A zero-width joiner is how emoji sequences are built and is entirely expected there. A zero-width non-joiner is meaningful in Persian and Hindi text. The same characters inside an identifier or a config key are defects, and context is what decides.

What is a bidirectional override and why is it flagged?

A control character that changes the display order of text without changing its content. In source code that means what you read and what the compiler reads can differ, which is the mechanism behind the Trojan Source class of attacks. In code you did not write, one turning up is a finding rather than a curiosity.

Does the cleaned version change my tabs?

No. Tabs are reported by line and left exactly as they are, because indentation style is a real choice rather than a defect. The cleaner normalises line endings, removes the byte-order mark, converts typographic spaces to ordinary ones, strips zero-width and bidirectional characters, and trims trailing whitespace - nothing else.

Next, try one of these

More from Developer, or browse the full catalogue.

When it is not the characters

Some bugs are invisible for a different reason

If the text is clean and the behaviour is still wrong, the problem is upstream - an encoding boundary, a normalisation step, or something in the pipeline rewriting your input. An hour with a senior engineer is usually faster than the afternoon you were about to spend bisecting it.

Talk to an engineer from $3/hr