Text direction detector (LTR/RTL)
Detect whether text runs left-to-right or right-to-left and get the dir attribute to use.
Related tools
Text direction detector (LTR/RTL)
Latin, Cyrillic and Greek run left to right; Hebrew, Arabic, Syriac, Thaana, N'Ko and Adlam run right to left — and text that mixes them is where layouts quietly break. Paste any string and this tool reports its writing direction two ways: the strong-character majority, which is the sensible paragraph direction, and the first strong character, which is what a browser's dir="auto" actually keys on. When the two disagree — an RTL sentence that happens to open with a Latin brand name — you have found precisely the string that will render wrong with auto direction.
The report counts strongly-typed LTR and RTL characters with percentages, plus the neutral rest (digits, punctuation, spaces, emoji, which adapt to their surroundings under the Unicode bidi algorithm). It ends with the ready-to-paste attribute, dir="ltr" or dir="rtl", and adds a warning line when the minority direction exceeds ten percent — genuinely bidirectional content that deserves explicit markup for its embedded runs rather than one attribute at the top.
Typical moments this earns its place: debugging why a user-submitted string renders its punctuation on the wrong side, deciding what dir to store alongside user-generated content, checking translation files before shipping an Arabic or Hebrew locale, or demonstrating bidi behavior in a bug report.
Everything runs locally in your browser — the text you inspect never leaves your device.