How to Find Invisible Characters in Text

Two lines look completely identical on screen but a comparison, lookup, or piece of code insists they aren't the same. Nine times out of ten the cause is a character that isn't rendering as anything visible at all - a non-breaking space instead of a regular one, a zero-width space sitting between two letters, or a byte order mark at the start of a file. None of these show up by eye. All of them count as a real character to any exact comparison.

Quick answer

Invisible characters - non-breaking spaces, zero-width space/joiner/non-joiner, BOM, word joiners, tabs, and carriage returns - look like nothing but still occupy a character position, which breaks exact-match comparisons even when text looks identical. Paste your text into the Invisible Character Detector and every one is replaced with a visible labeled badge (like [NBSP] or [ZWS]) showing exactly where it is, plus a cleaned copy with them removed.

Reveal hidden characters in your text now. Free, no account needed.

Open Invisible Character Detector →

What counts as invisible

  • Non-breaking space (NBSP) - looks exactly like a regular space but prevents a line break at that point.
  • Zero-width space/joiner/non-joiner - take up no visible width but sit between characters as real, distinct code points.
  • Byte order mark (BOM) - a marker some tools add at the very start of a text file to signal its encoding.
  • Word joiner - similar to a zero-width space, used to prevent an unwanted line break without adding visible space.
  • Tabs and carriage returns - render as whitespace or nothing depending on the editor, but are distinct characters from a plain space or line feed.

Where they come from

Copying text out of Word documents or web pages is the most common source - both use non-breaking spaces to control how names, dates, or short phrases wrap, and that character travels with the text wherever it's pasted. PDFs often leave stray characters behind from how the original layout was encoded. Zero-width characters are increasingly used deliberately as an invisible watermark in AI-generated text, embedded between words in a pattern that's undetectable to the eye but can be extracted programmatically. And exporting from Windows versus Unix-based tools produces different line-ending conventions - carriage return plus line feed on Windows, just line feed on Unix - which is invisible in most editors but very much present in the underlying bytes.

The symptoms that point here

A list comparison tool reporting that two visually identical lines don't match is the single most common tell. A VLOOKUP or similar lookup failing to find a value that's clearly present in the data is another - the lookup key has a trailing NBSP the visible value doesn't appear to have. In code, a pasted snippet that produces a baffling syntax error on a line that looks completely normal is frequently a zero-width character sitting inside an identifier or string literal. In all three cases, the fix isn't retyping the text - it's finding and removing the specific invisible character causing the mismatch.

How the detector annotates your text

Paste text into the tool and each invisible character is swapped for a visible, color-coded badge inline exactly where it occurs - [NBSP], [ZWS], [TAB], and so on - so you can see precisely which line and which position is affected, rather than a vague "something doesn't match" result. A summary at the top counts how many of each character type were found across the whole input. A cleaned version of the text with all invisible characters stripped is generated alongside it, ready to copy back into whatever needed the fix.

Want the full list of reasons identical-looking text fails to match?

Invisible characters are one cause among several - see them all.

Read the guide →

Frequently Asked Questions

What counts as an invisible character?
Any character that renders as blank space or nothing at all but still exists in the text: non-breaking spaces (NBSP), zero-width space/joiner/non-joiner, byte order marks (BOM), word joiners, tabs, and carriage returns. They all take up a character position even though nothing visible marks their presence.
Why do zero-width characters exist at all if you can't see them?
They have legitimate uses in typography and internationalization - zero-width joiners connect emoji into combined glyphs, zero-width non-joiners prevent unwanted ligatures in some scripts. But they also show up accidentally from copy-paste, and increasingly as invisible watermarking inserted into AI-generated text.
Why does copying from Word or a webpage introduce these characters?
Word and many web page editors use non-breaking spaces to control line wrapping (so a name doesn't break awkwardly across two lines), and some web publishing tools insert zero-width characters for layout or tracking reasons. Copy the text out and those characters come along invisibly.
What symptoms suggest invisible characters are the problem?
The most common: a list comparison says two 'identical' lines don't match, a VLOOKUP or similar lookup returns no match despite the value clearly being there, or code that looks correct fails to compile or run with an unhelpful syntax error.
Are Windows and Unix line endings an invisible character issue?
Yes, in a sense - Windows text files end lines with a carriage return plus line feed, while Unix-style files use just a line feed. The extra carriage return is invisible in most editors but can cause line-by-line comparisons or scripts expecting Unix line endings to behave unexpectedly.
How does the invisible character detector work?
Paste your text into the Invisible Character Detector and every invisible character is replaced with a visible, labeled badge - like [NBSP] or [ZWS] - right where it occurs in the line, along with a summary count of each type found.
Can I get a cleaned version of my text?
Yes, the tool also produces a cleaned copy with the detected invisible characters stripped out, so you can paste the clean version directly wherever the original was causing problems.
Will removing invisible characters change how my text looks?
Visually, no - by definition these characters don't render as anything visible, so removing them doesn't change how the text appears on screen. It only changes whether it matches other text byte-for-byte.

Share this tool

Featured on ToolDirs
© 2026 ListDiff

Free online list and text processing tools.