Skip to content
All posts
4 min read

Claude Scrambles Hebrew Text? One Instruction Fixes Mixed RTL Lines

Amit Raz

Amit Raz

Founder, RZ AI Labs

If you work with Claude in Hebrew, you know this one: the moment the first word in a line is English, the whole line scrambles. It happens when you write to the model and it happens when the model answers, and in technical conversations, where half the nouns are English tool names, it happens constantly.

The original version was a tweet in Hebrew.

Why do mixed Hebrew and English lines break?

This is not a bug, and it is not Claude. It is the Unicode bidirectional algorithm, BiDi: the first strong character in a block determines the direction of the entire block. Open a Hebrew paragraph with an English word and the renderer decides the block is left-to-right, then lays the Hebrew out backwards around it.

When I write, I can control it: I have learned to open mixed sentences with a Hebrew word, and the same habit works on X or anywhere else BiDi text renders. But when Claude answers, it opens lines however it likes, and a response full of paragraphs that start with npm or Docker turns into a scrambled mess.

The one instruction that fixes it

You do not need to fix the renderer. You need the model to stop handing it left-to-right openers. Add this to your user instructions (this is the English rendering; write it in your own language if you prefer):

When you answer in Hebrew, open every paragraph, every list item,
and every heading with a Hebrew word. Never start a line with an
English term or a command name.

The content of the answer does not change. The English terms are all still there, just never in the first position of a block. Every block now opens with a strong right-to-left character, BiDi picks the right direction, and the display stays correct.

The first strong character in a block determines the direction of the whole block. Give the renderer a Hebrew opener and everything else falls into place.

Where should the instruction live?

  • Claude apps: in your profile's custom instructions, so it applies to every chat.
  • Claude Code: in your global CLAUDE.md, so terminal output stays readable too.
  • Your own products: in the system prompt. If you are shipping an assistant to Hebrew, Arabic, or Farsi speaking users, this one line is the difference between output that looks native and output that looks broken.

The rule is the same for any right-to-left language: the fix is not Hebrew specific, it is BiDi specific.

This is a tiny example of a pattern I see in every team I train: the difference between an AI tool that feels polished and one that feels janky is usually a handful of one-line instructions someone bothered to write down. Collecting those lines is a big part of what my AI workshops are about.

FAQ

Why does mixed Hebrew and English text display in the wrong order?

It is not a bug, it is the Unicode bidirectional (BiDi) algorithm: the first strong character in a block determines the direction of the whole block. When a Hebrew paragraph opens with an English word, the renderer treats the block as left-to-right and the line comes out scrambled. The same rule applies to Arabic, Farsi, and any other right-to-left language.

How do I stop Claude from starting Hebrew lines with English words?

Add one line to your user instructions or CLAUDE.md: when answering in Hebrew, open every paragraph, every list item, and every heading with a Hebrew word, and never start a line with an English term or a command name. The output content stays identical, but every block now begins with a strong right-to-left character, so the display stays correct.

Building something with AI?

I help teams ship custom agents, AI strategy, and software that works.