You cannot see hidden characters by definition, but you can absolutely detect them. Here are the reliable methods, from easiest to most technical.
Method 1: a cleaner that reports what it finds
The simplest detector is a cleaner that lists what it removes. Paste your text in and read the report: if it shows zero-width spaces, a byte-order mark, non-breaking spaces, or direction marks, those characters were present. textscrubr does this in your browser, showing a count of each hidden character it found, which turns the invisible into something you can actually see and verify.
Method 2: show whitespace in your editor
Many code editors can reveal invisible characters:
- VS Code: enable "Render Whitespace" and the "Highlight Non-Breaking Spaces" or unusual-character warnings. VS Code flags non-breaking spaces and some invisibles automatically.
- Sublime, Notepad++, and others: turn on "Show whitespace" or "Show all characters."
These display markers where normal spaces, tabs, and sometimes special spaces sit, so anomalies stand out.
Method 3: compare byte length to visible length
A quick technical check: a hidden character adds to the byte or code-point count without adding anything visible. If a string looks like 10 characters but reports 12, two are hiding. You can check this in a console:
text.length // code point-ish count in JavaScript
len(text) # character count in Python
If the number is higher than what you can see, you have passengers.
Method 4: search by code point
If you know what you are hunting, search directly:
- In an editor that supports regex, search for
\u200B(zero-width space),\u00A0(non-breaking space), or\uFEFF(BOM). - This confirms presence and shows you where each one sits.
Which method to use
For a quick check on any text, the cleaner-report method is fastest and needs no setup. For ongoing work in code, turn on whitespace rendering so you catch them as you type. For automated pipelines, scan by code point in a script. In every case, once you have detected them, removing them is the easy part.