LEFT-TO-RIGHT MARK and RIGHT-TO-LEFT MARK are invisible Unicode characters used to help the Unicode Bidirectional Algorithm resolve direction around otherwise ambiguous text.
They’re usually shortened to LRM and RLM.
U+200E LRM behaves like a zero-width character with strong left-to-right directionality. U+200F RLM does the same in the right-to-left direction.
They don’t insert a visible space, and they don’t switch an entire paragraph into a new writing direction. A better mental model is: an invisible directional character placed exactly where the bidi algorithm needs another clue.
LRM and RLM at a Glance
| Code point | Name | Short name | Visible? | Direction |
|---|---|---|---|---|
| U+200E | LEFT-TO-RIGHT MARK | LRM | No | Strong left-to-right |
| U+200F | RIGHT-TO-LEFT MARK | RLM | No | Strong right-to-left |
They belong to the wider family of invisible and special space characters, but their job is direction—not spacing or line breaking.
Why Does Mixed-Direction Text Need Marks Like These?
Latin text normally runs left to right. Scripts such as Arabic and Hebrew normally run right to left.
When both directions appear in the same paragraph, software uses the Unicode Bidirectional Algorithm (UBA) to work out the visual order. Letters often provide clear directional information, but punctuation, spaces, symbols, and some number-related contexts can be more ambiguous.
That’s where LRM and RLM can help. They add a strong directional signal without forcing the author to insert a visible letter just to influence layout.
What Does LRM Do?
U+200E LEFT-TO-RIGHT MARK acts like an invisible left-to-right character for bidi processing.
Conceptually, a string might contain:
text + [LRM] + punctuation
The LRM gives the surrounding bidi context another strong left-to-right signal. This can help neutral or weak characters resolve the way the author intended.
What Does RLM Do?
U+200F RIGHT-TO-LEFT MARK provides the corresponding strong right-to-left signal.
Conceptually:
text + [RLM] + punctuation
Again, RLM doesn’t display a visible glyph. What you notice—if anything—is a change in how surrounding characters are ordered.
LRM and RLM Are Not Direction “Switches”
It’s easy to read the names and imagine that RLM means “everything after this is RTL” or that LRM permanently switches the paragraph back to LTR.
That isn’t how they work.
Unicode treats LRM and RLM as lightweight, unpaired directional marks. They behave like invisible strong-direction characters at their position; they don’t open a scoped formatting region.
If you need an entire span to be directionally isolated from its surroundings, Unicode provides LRI, RLI, FSI, and PDI instead. See LRI, RLI, FSI, and PDI: How Unicode Bidirectional Isolates Work.
LRM and RLM Are Not Spaces
Both marks have zero width, but they aren’t special space characters.
| Character | Main role |
|---|---|
| U+200B ZERO WIDTH SPACE | Invisible word separation / break opportunity |
| U+200E LRM | Strong left-to-right bidi signal |
| U+200F RLM | Strong right-to-left bidi signal |
Unicode explicitly notes that LRM and RLM carry no word-breaking semantics.
Why Can Punctuation Look Out of Place?
Punctuation is often neutral for bidi purposes. Its displayed position can therefore depend on the strong text around it.
In a mixed-direction string, a period, colon, bracket, slash, or similar character can appear visually attached to a different run than the author expected. A carefully placed LRM or RLM can provide the missing directional context.
The goal isn’t to drag punctuation into place manually. It’s to give the UBA enough information to resolve the layout correctly.
What About Numbers?
Numbers have their own bidi behavior, which can make combinations of digits, punctuation, currency signs, and labels look surprising when the surrounding text runs in the opposite direction.
LRM or RLM can help in some cases, but bidi problems are context-sensitive. Adding marks at random until the string “looks right” can create a new problem somewhere else.
Why Can LRM or RLM Appear in Copied Text?
They’re real code points. If a document, app, or webpage uses them to keep mixed-direction text readable, a copy operation can preserve them.
You may paste a string that looks ordinary and still find that its code-point count is different, punctuation reorders when a mark is removed, or an exact low-level comparison sees an extra character.
That doesn’t mean the source text is broken. The invisible mark may be doing useful work.
Do LRM and RLM Matter for Search or Sorting?
Unicode says bidirectional ordering controls should be ignored for text processes such as sorting and searching, because their purpose is layout.
That doesn’t mean every low-level comparison automatically ignores them. A code-point-for-code-point or binary comparison can still distinguish a string that contains U+200E or U+200F from one that doesn’t. Applications can also use different matching and indexing policies.
If two strings look the same but don’t match in a particular system, Why Invisible Unicode Characters Can Break Search and String Matching explains why inspecting the actual sequence is still useful.
Should You Remove LRM or RLM?
Not just because they’re invisible.
If a mark is helping mixed-direction text display correctly, deleting it can change punctuation or ordering. If it appears in a field where bidi formatting isn’t allowed or needed, removal may be appropriate.
A safer process is to confirm the code point, check whether the text mixes directions, understand what changes if the mark is removed, and only then decide whether it’s intentional or unwanted.
For a broader cleanup workflow, see How to Find and Remove Invisible Unicode Characters Without Breaking Text.
How Can You Find LRM or RLM?
Use a code-point-aware editor or Unicode inspector and look for:
- U+200E — LEFT-TO-RIGHT MARK;
- U+200F — RIGHT-TO-LEFT MARK.
Don’t rely on visual inspection. These marks are designed to affect ordering without displaying their own glyphs.
The Main Difference
LRM is an invisible strong left-to-right mark. RLM is an invisible strong right-to-left mark.
They don’t create spaces, they don’t open formatting scopes, and they don’t flip an entire document’s direction. They simply give the Unicode Bidirectional Algorithm a local directional clue where the visible text may not provide one clearly enough.