Bidirectional Text Tester
Text and segment
Isolates (FSI/RLI/LRI … PDI) are the modern control; embeddings and overrides (RLE/LRE/RLO/LRO … PDF) are the legacy form that can leak into surrounding text. The wrapped output contains real Unicode control characters — First-strong isolate (FSI … PDI).
Wrapped output
Start typing above — the results update as you write.
Wrap a whole text or a single fragment in Unicode bidirectional controls — isolates or the older embeddings and overrides — and see the exact code points that were inserted, so mixed-direction text renders the way you intend.
What is Bidirectional Text Tester?
When mixed-direction text misbehaves, the fix is usually one or two invisible characters. The Bidirectional Text Tester places Unicode control characters around a fragment or around the entire text and shows exactly what it added, by offset and code point, so the change is inspectable rather than mysterious. The controls are real characters: copy the result into a document, a database field or a template and the behaviour travels with the text.
The Unicode Bidirectional Algorithm decides how a paragraph of mixing scripts is displayed. It resolves most cases on its own, but a fragment with neutral characters at its edges — a number, a bracketed citation, a Latin product name inside an Arabic sentence — can be pulled into the surrounding direction and reorder visually. Wrapping that fragment in a matching pair of controls tells the algorithm where the fragment begins and ends, which is what stops punctuation and digits from drifting to the wrong side.
Isolates are the modern form. A first-strong isolate opens with FSI and closes with PDI: the algorithm looks at the enclosed text to decide its direction, which is the safest choice when you do not know in advance whether the content is Arabic, Hebrew or Latin. The explicit right-to-left and left-to-right isolates (RLI and LRI) are for cases where you do know and want the direction pinned. Isolates are preferred because they cannot leak their effect past the closing character.
Embeddings and overrides are the older mechanism and are still offered because legacy systems and some publishing pipelines use them. They open with RLE, LRE, RLO or LRO and close with a pop directional formatting character. An override forces the display order to a direction regardless of the content, which is powerful and also easy to over-apply; without a matching close it can spill into the rest of the paragraph. The tool states the pair it will use in plain words before you apply it, so you always know which form you are getting.
The control list below the output is the part worth keeping. Every inserted character is listed with its hex value and a plain-language label, so you can see that a fix consists of, say, two code points at specific offsets. That is also how you audit text that arrived from somewhere else: an unexpected override inside a bank statement, a code comment or a review is the classic way that displayed order and actual order are made to differ, and this list makes such characters visible instead of invisible.
Nothing leaves the browser and nothing is stored. If you later want to remove the controls again — for a plain-text export, a search index or a diff — the normalization tool strips invisible and directional characters and reports how many it removed, which is the clean way back from a wrapped document.
Testing a template is the most common use in practice: paste a sample of bidi text, wrap the fragment that keeps moving, and copy the result into the fixture so the same fix applies wherever that content renders. Because the output is ordinary text with real control characters, a diff shows exactly which code points were added at which offsets.
How to use Bidirectional Text Tester
- Paste the full text that mixes directions.
- Type the fragment to isolate, or leave the field empty to wrap the entire text.
- Choose the control pair. The first-strong isolate is the safe default when the fragment's language varies.
- Check the replaced or appended row, then read the control list to confirm the code points that were added.
- Copy or download the wrapped text and paste it into its destination.
When to use Bidirectional Text Tester vs related tools
Reach for it when a fragment inside a paragraph keeps drifting — a Latin brand name in Arabic copy, a bracketed number at the end of a Hebrew sentence, a URL beside RTL text. The RTL Text Tester is the diagnostic step before this one: it shows which paragraphs are currently resolving in each direction.
If a document arrives with controls already inside it and you need a clean plain-text version, the Unicode Text Normalizer removes invisible and directional characters and reports the count, so you know the character-level state of the file.
Privacy & Security
This tool runs entirely in your browser — no data ever leaves your device. There is no server round-trip, no upload, no logging, and no account required. Your input is processed locally using client-side JavaScript and is never stored, transmitted, or accessible to anyone else. When you close the tab, everything disappears.