Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>RTL for ClaudeNew to Visual Studio Code? Get it now.
RTL for Claude

RTL for Claude

Mahdi Ghorbanian

|
190 installs
| (0) | Free
Right-to-left text + the Vazirmatn font in the Claude Code chat — and, if you opt in, the Codex chat too. For Persian, Arabic, Urdu and every RTL language. Auto-applies and survives updates.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

RTL for Claude — demo

RTL for Claude

Finally — Persian, Arabic, Urdu and every right-to-left language read correctly in the Claude Code chat. Automatic, per-paragraph right-to-left + the gorgeous Vazirmatn font. Your code and English stay exactly as they are.

Version Installs License

✨ Features

  • 🪄 Automatic — detects each paragraph's direction (smart ratio detection, so a mostly-Persian line stays RTL even when it opens with an English word).
  • 🔤 Vazirmatn font — adjustable family, size and line spacing.
  • ⌨️ Live compose box — flips to RTL as you type; caret and text stay together.
  • 🎛️ Per-message ⇌ override and a global Auto / RTL / LTR toggle.
  • 🧩 Never breaks code — code blocks, diffs and terminals stay left-to-right.
  • 🔁 Survives updates — re-applies itself automatically after every Claude Code update.
  • 🤝 Codex too, if you want — one setting also covers the OpenAI Codex chat with the same fonts and settings, and re-applies it after Codex updates. Offered once, automatically, when Codex is installed.
  • 🔒 100% local — no servers, no tracking.

Install

  1. Click Install above.
  2. Run Developer: Reload Window (Cmd/Ctrl + Shift + P).

That's it — the Claude chat now reads right-to-left. Fine-tune everything from the RTL for Claude panel in the left sidebar, or the quick menu on the status bar.

Without installing the extension

Rather not install anything from the Marketplace? The same patch is available two other ways — the quick one:

npx rtl-for-claude --claude-code

or entirely by hand, from a clone of the repository, so you can read what runs before it runs: bash vscode-extension/apply-rtl.sh.

The extension is still the better option — it re-applies itself after every Claude Code update, while these patches have to be re-run by hand.

Settings

Setting Default What it does
rtlForClaude.enabled true Master on/off (off restores the original chat).
rtlForClaude.autoApplyOnStartup true Re-apply on startup (survives Claude updates).
rtlForClaude.language auto Language of this extension's panel and settings: auto, en, fa, ar, ur.
rtlForClaude.font.family Vazirmatn Vazirmatn, Sahel, System default, or Custom.
rtlForClaude.font.custom "" Your own installed font family (used when Font is Custom); Vazirmatn stays as the fallback.
rtlForClaude.font.scale 1 RTL text size (0.8–1.6).
rtlForClaude.font.lineHeight 1.85 Line spacing (1.3–2.5).
rtlForClaude.font.letterSpacing 0 Extra letter spacing in em (−0.05–0.2).
rtlForClaude.detection.mode ratio ratio (smart) or first-strong.
rtlForClaude.detection.threshold 0.1 Smart-mode RTL threshold (0.1–0.7). Lower = flips more easily.
rtlForClaude.applyToInput true Flip the message box as you type.
rtlForClaude.showMessageToggles true Per-message ⇌ override button.
rtlForClaude.keepCodeLeftToRight true Keep code / diffs / terminals LTR.
rtlForClaude.codex.enabled false Also patch the Codex chat (openai.chatgpt) and keep it patched across its updates.
rtlForClaude.togglePlacement toolbar Whole-chat direction button: toolbar, floating or hidden.
rtlForClaude.showInActivityBar true Show the panel (big icon) in the left Activity Bar.
rtlForClaude.showStatusBar true Show the small RTL item in the status bar.

Commands (Cmd/Ctrl + Shift + P)

  • RTL for Claude: Turn On / Off
  • RTL for Claude: Show / Hide Sidebar Panel
  • RTL for Claude: Re-apply to the chat now
  • RTL for Claude: Restore original chat — run this before uninstalling.
  • RTL for Claude: Open Settings

Keyboard shortcuts

Shortcut What it does
Cmd/Ctrl + Shift + 9 Cycle the whole chat: Auto → RTL → LTR (works inside the chat itself).
Cmd/Ctrl + Shift + 8 Turn RTL for Claude on / off.
Cmd/Ctrl + Shift + 7 Re-apply to the chat now.

The last two are normal VS Code keybindings — rebind them in Keyboard Shortcuts. The first one lives inside the chat webview (that's where the direction pin is kept, out of reach of the extension host), so it works whenever the chat has focus.

Turning it off / uninstalling

The clean way: toggle Enabled off (or run Restore original chat) — the chat reverts instantly. It's best to do this before you uninstall.

A live chat only updates after a window reload, so uninstalling won't change an already-open chat until you reload. Uninstall attempts an automatic restore on that next reload, but toggling off first is the sure way.

How it works (full transparency)

The Claude chat is a sandboxed webview no extension can reach into at runtime, so RTL for Claude patches Claude Code's own webview/index.css + index.js, compiling your settings into the styles and the RTL engine it injects. Everything runs locally inside the webview — no remote code, no telemetry. Each original file is backed up (*.rtl-backup) and fully restorable. Works with VS Code, Cursor and Windsurf.

With rtlForClaude.codex.enabled, the same treatment covers the Codex extension: a marked, fully reversible block in its webview/index.html loads the same RTL engine. A patch applied with the standalone script is recognised and never removed unless you opt in.

Privacy

100% local. No servers, no analytics — nothing ever leaves your machine.

License

MIT. Bundled Vazirmatn font under SIL OFL 1.1. Source & a no-install script: github.com/mahdigh99/rtl-for-claude.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft