Unicode Character Inspector: Finding Hidden Bidirectional Controls and Invisible Characters
How a Unicode character inspector exposes hidden bidirectional controls, right-to-left overrides and other invisible characters, and when to keep, escape or remove them.
Text can look correct on screen and still contain characters you cannot see. Some of them change only spacing or line breaking. Others, the bidirectional controls, change the order in which characters are displayed. A Unicode character inspector shows what is actually stored in a string, one code point at a time, so you can judge whether the visible text matches the underlying data. This review covers what such an inspector reveals, what bidirectional controls actually do, and when inspection, escaping, removal or plain text is the right choice.
Is a Unicode inspector the right tool for your task?
An inspector is the right first step when you need to know why text behaves strangely, for example when a search fails to match a word that looks identical, a filename appears to have the wrong extension, pasted code will not compile, or a line of mixed English and Arabic or Hebrew renders in an unexpected order. Its main benefit is that it replaces guessing with a list of exact code points and their names.
The decisive tradeoff comes after inspection. Many invisible characters are legitimate and carry meaning. Directional marks help mixed-direction text display correctly, the zero-width joiner holds many emoji sequences together, and the zero-width non-joiner affects letter shaping in scripts such as Persian. Stripping every invisible character can therefore damage text that was working as intended. Inspection tells you what is there; deciding what to remove still requires knowing the language and the destination.
Plain text with no formatting or directional controls is preferable for source code, identifiers, usernames, filenames, URLs, configuration values and anything that will be compared, searched or executed. In those contexts a hidden override has no legitimate display purpose and can make the text misleading.
What an inspector actually changes
A pure inspector changes nothing. It reads the stored characters and presents them in a visible form: typically the code point (such as U+202E), the official character name, and properties such as the general category and bidirectional class. Invisible and format characters belong to categories that an inspector can flag even though a normal text view shows nothing.
Many inspection workflows also offer transformations, and these do change the stored text. It helps to keep three operations separate:
- Highlighting: the text is unchanged; hidden characters are marked only in the inspector's display.
- Escaping: each hidden character is replaced with a visible notation such as U+202E or \u202E, which changes the stored text but preserves the information.
- Removing: the hidden character is deleted, which changes the stored text and discards whatever effect it had.
How bidirectional controls work, and why "reversed" text can be misleading
Unicode stores text in logical order, the order in which it is read or typed. The Unicode Bidirectional Algorithm then decides the visual order on screen, so that right-to-left scripts such as Arabic and Hebrew display correctly alongside left-to-right text. Bidirectional controls are invisible characters that adjust this algorithm.
This is where the word "reverse" becomes ambiguous. Character reversal tools rewrite the stored sequence so the last character comes first. A right-to-left override does something different: the stored order stays the same, but the characters after the override are displayed in reverse until the override ends. Two strings can look identical on screen while one has been genuinely reversed and the other only appears reversed. Neither is the same as "mirror" text, which usually means substituting look-alike glyphs or applying a visual flip with styling.
| Code point | Name | Effect |
| U+200E | Left-to-right mark (LRM) | Invisible strong left-to-right character that influences nearby neutral characters such as punctuation |
| U+200F | Right-to-left mark (RLM) | Invisible strong right-to-left character with the same purpose |
| U+061C | Arabic letter mark (ALM) | Right-to-left mark used in Arabic-script contexts |
| U+202A | Left-to-right embedding (LRE) | Starts a left-to-right embedding; ended by U+202C |
| U+202B | Right-to-left embedding (RLE) | Starts a right-to-left embedding; ended by U+202C |
| U+202D | Left-to-right override (LRO) | Forces following characters to display left to right; ended by U+202C |
| U+202E | Right-to-left override (RLO) | Forces following characters to display right to left; ended by U+202C |
| U+202C | Pop directional formatting (PDF) | Ends the most recent embedding or override |
| U+2066 | Left-to-right isolate (LRI) | Isolates a span as left to right; ended by U+2069 |
| U+2067 | Right-to-left isolate (RLI) | Isolates a span as right to left; ended by U+2069 |
| U+2068 | First strong isolate (FSI) | Isolates a span and takes its direction from its first strong character; ended by U+2069 |
| U+2069 | Pop directional isolate (PDI) | Ends the most recent isolate |
A well-known misuse of the right-to-left override is disguising a file extension. In the example below, the stored name ends in .exe, but everything after the override is displayed in reverse, so the name appears to end in .pdf:
Displayed: invoiceexe.pdf
Stored: i n v o i c e [U+202E] f d p . e x e
Escaped: invoice\u202Efdp.exe
The same mechanism was the basis of the research known as Trojan Source, which showed that bidirectional controls placed in source code comments or strings can make code appear to do something different from what a compiler or interpreter processes. In response, several compilers, editors and code-hosting platforms added warnings for these characters. An inspector exposes the problem directly because it lists the override regardless of how the line is displayed.
When an override is applied to text containing combining marks (such as accents stored as separate code points) or multi-code-point emoji (such as sequences joined with U+200D), the visual result depends on the renderer. Some renderers keep a combining mark attached to its base letter and keep an emoji sequence intact; others may not. For that reason, a screenshot of overridden text is not reliable evidence of what is stored. The code point list is.
Other hidden characters worth checking
Searches for hidden or non-printable characters usually turn up more than bidirectional controls. These are common examples an inspector should identify:
- U+200B zero-width space: invisible break opportunity; often breaks search and matching.
- U+200C zero-width non-joiner: prevents letters from joining; meaningful in some scripts.
- U+200D zero-width joiner: joins characters; required in many emoji sequences and some scripts.
- U+2060 word joiner: prevents a line break without adding visible space.
- U+FEFF zero-width no-break space, also used as a byte order mark at the start of files.
- U+00AD soft hyphen: usually invisible unless a line breaks at that point.
- U+FE00 to U+FE0F variation selectors: change how a preceding character is presented, for example text versus emoji style.
- U+E0000 to U+E007F tag characters: invisible characters used in some flag emoji sequences and otherwise rarely needed.
Will the result stay usable after copying or sharing?
Bidirectional controls and other invisible characters are ordinary characters in the string, so copying and pasting plain text generally carries them along. Whether a destination keeps, strips, displays or warns about them depends on that destination; no destination-specific testing or documentation was supplied for this review, so behavior in any particular app, website or editor should be checked there rather than assumed. One environment rendering the text correctly does not show that others will.
Hidden characters affect use in predictable ways. Search and comparison treat a word containing a zero-width space as different from the same word without it. Editing can feel erratic when the cursor moves through an override, because logical and visual order no longer match. Sorting, deduplication and validation of usernames or identifiers can be undermined by characters that make two strings look the same while differing in storage.
How screen readers and other assistive technology handle these characters is not covered by the supplied evidence. Because assistive technology generally works from the stored text rather than the visual layout, text whose meaning depends on an override may be read in a different order from how it appears. Treat that as a reason to test with the specific assistive technology your audience uses, not as a confirmed result.
A plain-text equivalent is needed whenever the text will be executed, compared, indexed, used as an identifier, or read by someone who cannot see the visual rendering. For human-readable mixed-direction prose, keep the directional marks and isolates that make it display correctly, and prefer isolates over embeddings and overrides where you control the markup, because isolates limit their effect to the enclosed span.
What to look for in an inspector
- Shows every code point with its official name, not just a highlight.
- Flags format and control characters, including all bidirectional controls listed above.
- Shows bidirectional class so you can see why text reorders.
- Offers escaping as an option separate from removal.
- Lets you remove specific characters selectively rather than all invisible characters at once.
- Treats combining marks and emoji sequences as multiple code points so nothing is hidden inside a single visible glyph.
Privacy is a separate question. Whether a web-based inspector sends pasted text to a server, logs it or keeps it cannot be determined from how the tool looks or what its marketing says, and no such information was supplied here. For confidential text, check the tool's documented data handling or use an inspector that runs locally.
Bottom line
A Unicode character inspector is the dependable way to find hidden bidirectional controls and other invisible characters, because it reports stored code points rather than the visual result. Use it to diagnose, then decide case by case: escape or remove overrides and stray invisible characters in code, identifiers and filenames; keep the marks, isolates and joiners that legitimate multilingual text and emoji depend on; and verify behavior in each destination and assistive technology you rely on rather than assuming one successful rendering carries over.