The <bdo> element (Bidirectional Override) forces the direction of its text with dir="ltr" or dir="rtl", overriding the Unicode bidirectional algorithm for that span.
Characters are laid out from the chosen starting side; they are not drawn mirrored or backward. Prefer <bdi> when direction is unknown and you only need isolation.
Baseline · Widely available.
Not deprecated. Stable across major browsers since about July 2015.
dir is required in practice.
Always set dir to ltr or rtl. Without it, override has no useful direction to apply.
Syntax
HTML Syntax
syntax.html
<bdo dir="ltr|rtl">text</bdo>
Both start and end tags are required. Content is phrasing content.
Use this when the surrounding context might otherwise reorder the span.
Example 3 — Show Logical (Stored) Order
MDN-style demo: natural RTL display vs forced LTR to reveal storage order.
HTML
<p>
Looks like this in Hebrew:
<span dir="rtl">אה, אני אוהב להיות ליד חוף הים</span>
</p>
<p>
In the computer’s memory, this is stored as
<bdo dir="ltr">אה, אני אוהב להיות ליד חוף הים</bdo>
</p>
Choose <bdi> for usernames and other unknown-direction text.
Always pair bdo with dir.
Do not use override when isolation alone is enough.
Edge Cases & Pitfalls
Most mistakes come from missing dir or using override when isolation was enough.
required
Always set dir
Use ltr or rtl. An empty <bdo> without direction is not useful.
choice
Unknown direction → <bdi>
Do not force a wrong direction. Isolate with <bdi> instead.
glyphs
Characters are not mirrored
Override changes layout start side, not the drawing of each letter backward.
scope
Wrap only what you must override
Keep surrounding sentence text outside <bdo> unless the whole phrase should flip.
a11y
Prefer natural language direction when possible
Override is a special tool. For normal multilingual UI, mark language and use isolation carefully.
Compatibility
Browser Support
The <bdo> element is core HTML phrasing content for bidirectional override. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<bdo>
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera honor dir="ltr" and dir="rtl" overrides.
97%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
<bdo>Widely supported
Bottom line: Safe to use when you must force LTR or RTL. Prefer bdi for unknown-direction user content.
Remember
Key Takeaways
Role:<bdo> forces text direction with dir.
Values: use ltr or rtl — always set one.
vs bdi: override when known; isolate when unknown.
Glyphs: layout direction changes; letters are not drawn backward.
One line: use <bdo dir="ltr|rtl"> only when you must force direction.
UA style
Default CSS Settings
User agents typically apply a bidirectional override. A common idea looks like this:
default.css
bdo {
unicode-bidi: bidi-override;
}
The actual direction still comes from the HTML dir attribute (ltr or rtl).
Frequently Asked Questions
The bdo (Bidirectional Override) element forces its contents to render left-to-right or right-to-left using the required dir attribute, overriding the Unicode bidirectional algorithm for that span.
Yes for useful behavior. Set dir to ltr or rtl. Without a direction, override has nothing meaningful to apply.
bdo forces a known direction (ltr or rtl). bdi isolates text and usually lets direction be detected automatically — better when you do not know the direction in advance.
No. Characters are laid out starting from the chosen side; glyphs are not mirrored or drawn backward.
Use it when you must display text in a specific direction regardless of the surrounding algorithm — for example to show logical/memory order of RTL text, or to force RTL layout of a known string.
Prefer ltr or rtl on bdo. For automatic isolation, use bdi (which behaves like dir="auto") instead of forcing an override.