Skip to content

Fix reversed punctuation in Arabic SRT and VTT subtitles

When an Arabic subtitle line shows its full stop or question mark at the wrong end, or a line that starts with an English word comes out back to front, the player is laying that line out left to right. Adding an invisible right-to-left mark at the start of each line tells it which way to go. This tool does that for the whole file.

Loading the tool…

Processed in your browser. Your file is never uploaded.

What goes wrong, and why

Arabic is written right to left, and English left to right, and a line that mixes them is laid out by the Unicode bidirectional algorithm. In that algorithm the direction of a line is taken, when nothing says otherwise, from its first strongly directional character, and punctuation is neutral: it does not have a direction, so it follows the one around it. A subtitle file says nothing about direction, so the player guesses. When the guess is left to right, an Arabic sentence that ends with a full stop, a question mark or an exclamation mark shows that mark at the wrong end, and a line that begins with an English word or a number can be shown with its words in the wrong order.

What the tool changes

It puts one invisible character, the right-to-left mark (U+200F), at the start of each line of subtitle text. That is all. Cue numbers, time lines, the WEBVTT header, notes and blank lines are copied exactly as they were, so the file is otherwise identical and can be compared line by line with the original.

Before                                After
1                                     1
00:00:01,000 --> 00:00:03,500         00:00:01,000 --> 00:00:03,500
هل تسمعني جيدًا؟                      [RLM]هل تسمعني جيدًا؟

The mark is invisible, so after the change the text looks the same on this page, and that is expected. The note under the result counts how many lines received a mark.

Options

  • Only lines that contain Arabic letters. On by default. A line that is wholly English or only a symbol is left alone, so English lines in a mixed file keep reading left to right. Turn it off to mark every text line.
  • Remove instead of add. Takes direction marks off the start of each text line, which undoes this tool or cleans a file that came with marks you do not want.
  • A line that already starts with the mark is not given a second one, so running the tool twice does no harm.

What it cannot fix

Three other problems look similar and need other fixes. Question marks or strange symbols where letters should be mean the file is not saved as UTF-8, which is an encoding problem, not a direction one. Letters that appear unjoined and separate come from a player or font that does not support Arabic shaping. And some players ignore direction marks altogether; for those, a different player or the platform's own help is the only remedy. This tool also does not translate or edit anything, so for wording use the subtitle editor, which handles Arabic text in either direction.

Where the file comes from

Scriptorium's own SRT and VTT export writes Arabic text as it is and does not add direction marks; that was checked on 2026-10-26. If your subtitles were exported from here, this tool is the fast way to add them. If you need the format itself explained, transcript file formats explained covers it.

Questions

Why does the full stop jump to the other end of an Arabic line?

A subtitle file does not say which way a line reads, so the player works it out from the first strongly directional character. If that character is a Latin letter, a digit sequence or nothing Arabic at all, the line is laid out left to right, and punctuation, which has no direction of its own, takes the line's direction instead of the Arabic text's. The result is a full stop that appears next to the first Arabic word instead of the last.

What does the mark do?

U+200F, the right-to-left mark, is invisible but counts as a right-to-left letter. Put at the start of a line it becomes the first strong character, so the whole line is read right to left, including when the real text starts with an English word. Nothing visible is added.

Will it work in every player?

Not guaranteed. SRT has no formal specification, so players differ in how they treat direction, and some ignore the mark. Open the result in the player or platform your audience will use and look at four lines: one ending in a full stop or question mark, one starting with an English word, one with a speaker's name, and one that wraps onto two lines.

Is my file uploaded?

No. The change is JavaScript in this tab. The text you paste or the file you choose never leaves it.

No Arabic subtitle file yet?

Scriptorium transcribes Arabic speech with a start and end time for every line and exports SRT or VTT. You can try it free.

More pages like this