Fix text direction for Arabic, Hebrew, Persian, and Urdu conversations on ChatGPT.
ChatGPT RTL Direction makes right-to-left text read the way it should on chatgpt.com. It scans every message bubble and paragraph, automatically detects right-to-left characters, and applies proper RTL direction so Arabic, Hebrew, Persian, and Urdu text flows naturally from right to left. Code blocks, inline code, and math equations are always left untouched, so syntax stays intact.
The extension also watches your prompt input area and switches the textarea direction while you type — so your cursor and punctuation behave correctly in real time. A manual override toggle and keyboard shortcut let you force RTL, force LTR, or return to auto-detect at any moment. Built on a lightweight MutationObserver, it handles ChatGPT’s streaming, single-page architecture without slowing your browser.
How ChatGPT RTL Direction Works
The extension injects a content script into chatgpt.com that runs continuously in the background. It uses a MutationObserver to watch for new message bubbles as ChatGPT streams them into the DOM.
For each paragraph, list, and heading inside a message, it scans the text against Unicode ranges for Arabic, Hebrew, Persian, and Urdu characters. When RTL characters are detected, it applies dir="rtl" and right-alignment; otherwise the element stays LTR. It explicitly skips any element inside a <pre>, <code>, or math block to protect your code and equations.
The prompt textarea is monitored via input events, so the moment you type an RTL character, the cursor flips to the right edge. A state machine in the content script tracks whether you’re in auto-detect, force-RTL, or force-LTR mode, and the popup communicates with the active tab to update that state instantly.
Who Can Use This Extension
- Arabic speakers writing or reading ChatGPT responses.
- Hebrew speakers who need proper RTL text flow.
- Persian and Urdu users working with AI-generated content.
- Multilingual users who switch between English and RTL languages in the same conversation.
- Developers, students, and researchers who review code alongside Arabic or Hebrew explanations and need code blocks to stay LTR.
- Anyone who finds ChatGPT’s default left-to-right layout uncomfortable for RTL scripts.
Key Features
- Auto-detects RTL scripts — Arabic, Hebrew, Persian, and Urdu, applied per message.
- Real-time prompt direction — the input textarea flips as soon as you type an RTL character.
- Protects code and math —
<pre>,<code>, and equation blocks always stay LTR and readable. - Manual override — force RTL, force LTR, or return to auto-detect via toggle or keyboard shortcut.
- Handles streaming responses — a MutationObserver corrects new message bubbles as they arrive.
- Lightweight and fast — built for ChatGPT’s single-page app without slowing your browser.
- Privacy-first — no data collection; everything runs locally in your browser.
Why ChatGPT Struggles With RTL Text
ChatGPT’s interface is designed left-to-right first and renders responses without checking whether the text is a right-to-left language. When Arabic, Hebrew, Persian, or Urdu appears, sentences display in the wrong order, punctuation lands on the wrong side, and mixed English–Arabic lines become hard to follow. Typing is just as awkward — the cursor sits on the wrong edge and punctuation jumps around. ChatGPT RTL Direction adds the missing bidirectional handling directly in your browser, fixing both reading and typing so your conversations look and feel correct.
Frequently Asked Questions
What does ChatGPT RTL Direction do? It automatically detects Arabic, Hebrew, Persian, and Urdu text in ChatGPT conversations and applies the correct right-to-left direction, so messages read naturally and your prompt input flips direction as you type.
Does it work with streaming responses? Yes. A MutationObserver watches for new message bubbles as ChatGPT streams them in, so responses are corrected in real time as they appear.
Will it break my code blocks or math? No. The extension explicitly skips <pre>, <code>, and math blocks, so your code and equations stay left-to-right and readable.
Which languages does it support? It detects and corrects Arabic, Hebrew, Persian, and Urdu using their Unicode ranges.
Can I control the direction manually? Yes. A toggle and keyboard shortcut let you force RTL, force LTR, or switch back to auto-detect at any time.
Does it fix typing, not just reading? Yes. The prompt textarea is monitored as you type, so the cursor and punctuation behave correctly the moment you enter an RTL character.
Will it slow down ChatGPT? No. It’s built on a lightweight MutationObserver designed for ChatGPT’s streaming single-page architecture, so it runs efficiently in the background.
Does it collect my data? No. The extension collects zero data — everything runs locally in your browser.