Find hidden and invisible Unicode characters in text

How a hidden character finder works, which invisible Unicode characters matter, when removing them is safe, and when they carry meaning you should keep.

Text can look clean and still contain characters you cannot see. A zero-width space inside a username, a byte order mark at the start of a CSV file, or a direction control in source code can each cause failures that are hard to trace by eye. A hidden character finder makes these characters visible so you can decide what to keep and what to remove. This review explains what such a tool actually reveals, where removal is safe, where it damages meaning, and how to inspect text yourself when you cannot vouch for an online tool.

Is a hidden character finder suitable for your use?

For diagnosis, yes. Inspecting text for invisible characters is low-risk because it only reports what is already stored. The decision that carries risk comes afterward, when you remove or replace what was found.

The main benefit is certainty: instead of guessing why two strings that look identical fail to match, you see the exact code points that differ. The decisive tradeoff is that some invisible characters are doing real work. The zero-width joiner holds many emoji sequences together, the zero-width non-joiner affects correct spelling in scripts such as Persian and several Indic scripts, and a no-break space keeps a number attached to its unit. Blanket removal can break these.

Plain text without invisible characters is preferable for identifiers and anything that must match exactly: usernames, passwords, email fields, URLs, file names, database keys, search terms, configuration values and source code. For prose in languages that depend on joiners, emoji-rich text or carefully typeset documents, inspect first and remove selectively.

What the tool actually changes

A finder does not change the text. It reads the stored sequence of Unicode code points and marks those that render with no visible width or no visible mark. Some tools display them as labels or symbols, others list their code point numbers and names. Only a separate cleaning step, which some tools bundle with inspection, alters the stored characters.

This differs from a visual effect. Reversed, mirrored or stylized "font" text changes how text looks, either by storing different characters or by applying display rules. Invisible characters are the opposite case: the stored text is different while the visible result looks unchanged. The one place where the two overlap is bidirectional control characters, which are stored characters whose purpose is to change display order. Text containing them can appear in a different order on screen than the order in which it is stored and processed.

Two other uses of "hidden" are easy to confuse with this topic. Word processors have a hidden-text formatting attribute, which is document formatting rather than a Unicode character. And so-called blank characters used for empty-looking names or messages, such as the Hangul filler or the braille pattern blank, are ordinary characters that happen to render as empty space. A good finder should flag both kinds of Unicode blanks, but they are not formally format or control characters, so tools that check only character categories may miss them.

Common invisible and blank-looking characters

Code point | Name | Typical legitimate role | Typical problem
U+200B | Zero width space | Marks optional line-break points in text without spaces | Breaks exact matching, search and copied identifiers
U+200C | Zero width non-joiner | Prevents letters from joining in some scripts | Removal can misspell words in those scripts
U+200D | Zero width joiner | Joins emoji into sequences and affects shaping in some scripts | Removal splits combined emoji into separate ones
U+2060 | Word joiner | Prevents a line break without adding space | Same matching problems as a zero width space
U+FEFF | Zero width no-break space / byte order mark | Marks encoding at the start of a file | Shows up as a stray character in the first field or line of data
U+00AD | Soft hyphen | Marks where a word may be hyphenated | Splits words for search and comparison
U+00A0 | No-break space | Keeps adjacent words or numbers on one line | Looks like a space but fails space-based matching and splitting
U+202F | Narrow no-break space | Thin non-breaking space in some number and date formats | Same as no-break space
U+200E, U+200F | Left-to-right and right-to-left marks | Correct placement of punctuation in mixed-direction text | Can alter apparent order of nearby characters
U+202A to U+202E, U+2066 to U+2069 | Bidirectional embeddings, overrides and isolates | Control display order in mixed-direction text | Can make text or code display in a different order than it is stored
U+FE00 to U+FE0F | Variation selectors | Choose text or emoji presentation of a character | Removal can change how a symbol or emoji appears
U+E0000 to U+E007F | Tag characters | Used in some flag emoji sequences | Can carry unseen content appended to visible text
U+3164, U+115F, U+1160, U+FFA0 | Hangul fillers | Placeholders in Korean text processing | Used to create names or messages that look blank
U+2800 | Braille pattern blank | Empty braille cell | Used to create text that looks blank

Will the result stay readable and usable after copying or sharing?

Invisible characters generally travel with copied text, because copying moves the stored characters rather than what you see. That is why they spread from web pages, chat messages, PDFs and word processors into spreadsheets, forms and code. Whether a particular destination keeps, strips or converts them depends on that destination; no evidence was supplied for any named app or platform, so do not assume that behavior observed in one place applies elsewhere. If it matters, paste a sample into the destination and inspect it again.

  • Search and matching: a word containing a zero-width space or soft hyphen may not be found by a search for that word, and two strings that look identical may compare as different.
  • Editing: the cursor may appear to pause without moving when it crosses an invisible character, and deleting it may take an extra keystroke.
  • Data handling: a byte order mark can attach to the first column name of a CSV file, and no-break spaces can stop values from splitting or converting to numbers.
  • Code: invisible characters in identifiers or string literals can cause errors that are hard to see, and bidirectional controls can make code display differently from how it is compiled or interpreted, an issue class publicly described as Trojan Source.
  • Accessibility: how screen readers announce or skip particular invisible characters varies, and no documentation or tests for specific assistive technologies were supplied here. Blank-looking names built from fillers or braille blanks may be read as nothing at all or announced in unexpected ways, so they are a poor choice wherever accessibility matters.

A plain-text equivalent is needed wherever text will be matched, typed back in by a person, read aloud, parsed by software or indexed for search. In those cases, remove invisible characters that have no linguistic or emoji role, replace no-break spaces with ordinary spaces if the field expects them, and strip a leading byte order mark from data files. Unicode normalization can help with some of this but not all: compatibility normalization (NFKC) turns a no-break space into an ordinary space, but it does not remove zero-width spaces or bidirectional controls.

Identifying the problem and finding a way to inspect text

Clues that invisible characters are present: the text length reported by an app is larger than the number of characters you can see; a search fails for a word that is clearly on screen; the cursor seems to stick when moving with arrow keys; a pasted value fails validation although it looks correct; or punctuation and numbers appear in an odd order near right-to-left text.

Useful search terms include "zero-width character detector", "invisible Unicode character viewer", "show Unicode code points" and "Unicode text inspector". Many programmer-oriented text editors can render whitespace and some can highlight invisible or ambiguous Unicode characters; check your editor's display or rendering settings, since option names differ and no specific navigation paths were verified for this article.

Before pasting text into a web-based finder, consider what the text contains. A tool's appearance or claims do not establish how it handles submitted text, and this review has no evidence about the privacy or retention practices of any particular tool. For confidential material, inspect it locally.

Inspecting text locally

The following Python script reads a UTF-8 file and lists the line, column, code point and name of format characters, control characters other than tab and line breaks, non-standard spaces, variation selectors and common blank-looking characters. It only reports; it changes nothing.

import sys
import unicodedata

EXTRA = {0x115F, 0x1160, 0x2800, 0x3164, 0xFFA0}
SKIP = {0x09, 0x0A, 0x0D, 0x20}

text = open(sys.argv[1], encoding="utf-8").read()
for line_no, line in enumerate(text.splitlines(keepends=True), 1):
    for col, ch in enumerate(line, 1):
        cp = ord(ch)
        if cp in SKIP:
            continue
        cat = unicodedata.category(ch)
        if cat in ("Cf", "Cc", "Zs", "Zl", "Zp") or cp in EXTRA or 0xFE00 <= cp <= 0xFE0F:
            name = unicodedata.name(ch, "<no name>")
            print(f"line {line_no}, col {col}: U+{cp:04X} {name}")

On systems with GNU grep built with Perl-compatible regular expression support and a UTF-8 locale, a quick check for the most common invisible characters looks like this:

grep -nP '[\x{00A0}\x{00AD}\x{200B}-\x{200F}\x{202A}-\x{202F}\x{2060}-\x{2064}\x{2066}-\x{2069}\x{FEFF}]' file.txt

Neither check decides what should be removed. Review each result in context: a zero-width joiner inside an emoji sequence or a non-joiner in Persian text is probably intentional, while the same character inside an email address or variable name almost certainly is not.