Unicode U+202A: Recognizing Left-to-Right Embedding
What U+202A LEFT-TO-RIGHT EMBEDDING does, how to detect it, how it survives copying and sharing, and when markup, isolates or plain text are the better choice.
U+202A is an invisible Unicode control character named LEFT-TO-RIGHT EMBEDDING, often abbreviated LRE. It has no glyph of its own. It changes how a run of text is ordered when it is displayed next to right-to-left scripts such as Arabic or Hebrew. Because it is invisible, it often goes unnoticed until it causes trouble in search, editing, identifiers or copied text. This review explains what the character changes, how to recognize it, and when it is better to use something else.
Short answer: is U+202A suitable for your use?
Use U+202A only when you have plain text with no markup available, the text mixes left-to-right and right-to-left content, and you can close the embedding reliably with U+202C POP DIRECTIONAL FORMATTING. Its main benefit is that it can keep a left-to-right phrase, such as an English product name or code with punctuation, in the correct order inside a right-to-left sentence. The main tradeoff is that the character is invisible but still stored. It travels with copied text and can break exact-match search, comparisons, usernames, file names and source code.
Plain text without the control is better when the text is entirely left-to-right, when it will be used as an identifier, password, URL, file name or code, or when the destination supports markup. For new content, the Unicode Bidirectional Algorithm (UAX #9) and web guidance generally recommend the directional isolate characters, or HTML and CSS direction markup, over embeddings like U+202A.
What U+202A actually changes
U+202A changes the stored text. It inserts an additional code point into the string. It does not reverse characters, mirror glyphs or substitute styled look-alike letters. Its effect is limited to display order. Under the Unicode Bidirectional Algorithm, it opens a new left-to-right embedding level for the following text. That level lasts until a matching U+202C (PDF) or until the end of the paragraph.
In a paragraph that is already left-to-right and contains only Latin text, adding U+202A usually has no visible effect. The character becomes relevant when left-to-right content sits inside right-to-left text. Without guidance, neutral characters such as spaces, punctuation and parentheses, and the ordering of number and letter runs, can be resolved in a way the writer did not intend.
| Code point | Name | Abbreviation | Role |
| U+202A | LEFT-TO-RIGHT EMBEDDING | LRE | Opens a left-to-right embedding level |
| U+202B | RIGHT-TO-LEFT EMBEDDING | RLE | Opens a right-to-left embedding level |
| U+202C | POP DIRECTIONAL FORMATTING | PDF | Closes the most recent embedding or override |
| U+202D | LEFT-TO-RIGHT OVERRIDE | LRO | Forces left-to-right order, ignoring character directionality |
| U+202E | RIGHT-TO-LEFT OVERRIDE | RLO | Forces right-to-left order, ignoring character directionality |
| U+2066 | LEFT-TO-RIGHT ISOLATE | LRI | Left-to-right run isolated from surrounding text |
| U+2069 | POP DIRECTIONAL ISOLATE | PDI | Closes an isolate |
An embedding is different from an override. U+202A still respects the inherent direction of each character, so Arabic letters inside an LRE run are still laid out right to left within that run. U+202D, by contrast, forces every character into left-to-right order. Confusing the two is a common source of unexpected visual reversal. That is a display effect, not a change to the order of the stored characters.
An embedding is also different from an isolate. An LRE run can still interact with surrounding text during bidirectional resolution. An isolate (U+2066 to U+2069) treats its content as a separate unit, which is usually closer to what writers intend when they insert a name, number or code fragment into a sentence.
How to recognize U+202A
Since the character is normally invisible, recognition depends on inspecting code points rather than looking at rendered text. Useful signs and methods include:
- In UTF-8 bytes, U+202A appears as the sequence E2 80 AA. A hex dump will show it even when an editor does not.
- In UTF-16, it is the single code unit 202A.
- Some code editors and terminals display bidirectional controls as a placeholder or warning marker. Whether this happens depends on the editor and its settings.
- A string that looks identical to another but fails an equality check or search often contains invisible format characters.
- Its Unicode general category is Cf (format), so filters that look for Cf characters will catch it along with other invisible controls.
- A lone U+202A without a following U+202C is a sign of unbalanced formatting. Its effect then extends to the end of the paragraph.
A minimal check in Python shows the character's presence by code point. It does not rely on how a terminal or font renders it:
import unicodedata
text = "\u202Aversion 2.1\u202C"
for ch in text:
if unicodedata.category(ch) == "Cf":
print(f"U+{ord(ch):04X}", unicodedata.name(ch, "UNKNOWN"))
# Expected output:
# U+202A LEFT-TO-RIGHT EMBEDDING
# U+202C POP DIRECTIONAL FORMATTING
print(len(text)) # 13: 11 visible characters plus 2 controls
print(text.encode("utf-8")[:3].hex()) # e280aa
The example uses escape sequences instead of pasted characters on purpose. Pasting invisible controls into documentation makes the example itself hard to verify.
Will text containing U+202A stay readable and usable after copying?
Readability and usability are two separate questions. Visually, text with a correctly balanced LRE and PDF pair may look the same as, or better than, text without them, provided the destination implements the Unicode Bidirectional Algorithm. Functionally, the controls remain in the data in any destination that preserves them.
- Copy and paste: plain-text copying typically carries the code point along. Some applications or platforms strip or normalize bidirectional controls, but this behavior varies. It should be tested for each destination rather than assumed.
- Search and matching: a query typed without the control may not match stored text that contains it, unless the search system ignores format characters.
- Editing: cursor movement and deletion around invisible controls can feel inconsistent. Users may delete the control without noticing, which can leave an unbalanced embedding.
- Identifiers and code: bidirectional controls in source code, file names, URLs or usernames can make displayed text differ from the logical text a program processes. This has been documented as a security concern. Bidirectional controls in code are widely flagged by modern compilers, linters and code hosting tools for that reason.
- Truncation: if text is shortened between U+202A and U+202C, the closing control may be lost and the embedding can spill into following text in the same paragraph.
Assistive technology is an evidence gap. No scoped test results for specific screen readers were supplied for this review. Screen readers generally work from the logical order of characters rather than the visual order, and format characters are usually not intended to be spoken. However, how any particular screen reader and browser combination handles U+202A should be confirmed by testing it, not inferred.
When a plain-text equivalent or markup is the better choice
Remove U+202A, or never add it, when the text will be compared, indexed, hashed, used as a key or typed back by users. In those cases, store the plain characters and handle direction at display time.
On the web, the HTML dir attribute and the bdi element handle direction without inserting characters into the content. The CSS properties direction and unicode-bidi can express the same intent at the presentation layer. For example, unicode-bidi: embed with direction: ltr corresponds to an LRE embedding. W3C internationalization guidance generally favors markup over bidirectional control characters when markup is available, because markup is visible in the source and does not contaminate copied text in the same way.
Where plain text is unavoidable, such as in some messaging fields, subtitles or data formats, prefer the isolate pair U+2066 and U+2069 for new content, keep every opening control balanced with its closing control, and keep a control-free version of the text for search and storage.
Practical checklist
- Confirm the text actually mixes left-to-right and right-to-left content. If it does not, U+202A adds risk without benefit.
- Check for a matching U+202C after every U+202A.
- Prefer HTML or CSS direction markup when the destination supports it.
- Prefer isolates (U+2066 to U+2069) over embeddings for new plain-text content.
- Strip bidirectional controls from identifiers, code, URLs and searchable keys.
- Test the specific destination, including copy, search and any assistive technology you rely on, rather than generalizing from one rendering.