The unicode-bidi property helps browsers render mixed-direction text correctly — essential for Arabic, Hebrew, and English on the same page.
01
Bidi text
RTL + LTR mix.
02
direction
Pair together.
03
embed
New level.
04
isolate
Separate context.
05
Usernames
LTR in RTL UI.
06
i18n
Global sites.
Fundamentals
Introduction
The unicode-bidi property in CSS is used to control the directionality and handling of text within an element. It primarily affects the bidirectional algorithm in text rendering, which is crucial for correctly displaying languages that are written from right to left (RTL) or mixed directionality.
Definition and Usage
Use unicode-bidi together with the direction property when you need fine control over how mixed scripts are ordered on screen. For whole-page direction, setting dir="rtl" on <html> or using direction is often enough; unicode-bidi helps with embedded snippets.
💡
Beginner Tip
Most day-to-day layouts use direction: rtl or direction: ltr. Reach for unicode-bidi when a small piece of opposite-direction text appears inside a paragraph and reads in the wrong order.
Foundation
📝 Syntax
The syntax for the unicode-bidi property is simple. It accepts one of the following values:
LTR and RTL characters appear in the same content.
Input
2
unicode-bidi sets bidi rules
Keywords like embed or isolate define formatting context.
Rules
3
Browser applies bidi algorithm
Characters reorder for correct visual reading direction.
Render
=
✅
Readable mixed-direction text
Users see text in the intended visual order.
Compatibility
Browser Compatibility
The unicode-bidi property is supported in all major browsers, including Chrome, Firefox, Safari, Edge, and Opera. However, older browser versions may have limited support or behave differently, so it’s advisable to test across different browsers if targeting a wide audience.
✓ Modern browsers · Widely supported
Bidirectional text support
All major browsers implement the Unicode bidirectional algorithm with CSS unicode-bidi and direction.
99%Browser support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions
Full support
OperaAll versions
Full support
Testing tip
Test RTL layouts with real Arabic or Hebrew content and verify numbers, URLs, and punctuation behave as expected.
unicode-bidi property99% supported
Bottom line:unicode-bidi is well supported for international text on the modern web.
Wrap Up
Conclusion
The unicode-bidi property is essential for correctly rendering text in languages that require bidirectional handling.
By understanding and utilizing this property, web developers can ensure that their web pages display text accurately and in accordance with the intended directionality of the content.
Use isolate for emails, URLs, and usernames in opposite-direction UI
Set lang and dir on <html> for page-level i18n
Test mixed scripts with real multilingual content
Prefer embed or isolate over bidi-override for body text
❌ Don’t
Use bidi-override casually on readable paragraphs
Forget direction when using embed
Assume LTR CSS alone fixes RTL text ordering
Ignore accessibility lang attributes on mixed-language content
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about unicode-bidi
Use these points when handling bidirectional text.
5
Core concepts
📚01
Bidi algo
Text direction.
Purpose
🕐02
normal
Default value.
Default
🔀03
+ direction
Pair properties.
Syntax
🔒04
isolate
Inline snippets.
Pattern
🌐05
i18n
RTL support.
Use case
❓ Frequently Asked Questions
unicode-bidi controls how the Unicode bidirectional algorithm handles text direction inside an element, especially for mixed RTL and LTR content.
The default is normal, which means the element follows the normal bidirectional behavior inherited from its context.
Often yes. Many unicode-bidi values such as embed and bidi-override work together with direction set to ltr or rtl to control text flow.
Use isolate when a short RTL or LTR snippet inside opposite-direction text should not affect surrounding characters, such as usernames, emails, or quoted phrases.
No, unicode-bidi is not inherited. Set it on the element that needs special bidirectional handling.