Skip to content
SubtitleDesk

The SRT subtitle format explained, line by line

Last updated · 2 min read

SRT is the most widely supported subtitle format, and also the most loosely defined. A line-by-line tour of the format, the variations you will meet, and the mistakes that break players.

SRT (SubRip Text) files are plain text, readable in any editor, and supported by almost every player. Knowing exactly what each line does makes broken files easy to diagnose.

Anatomy of a cue

A cue looks like this:

  • Line 1: 1
  • Line 2: 00:00:01,000 --> 00:00:03,500
  • Line 3: Hello, and welcome back.
  • Line 4: (empty)

The sequence number counts cues from 1. Many players ignore it entirely, but some editing software expects it to be present and in order.

The timing line has a start time, the arrow --> with a space on each side, and an end time. Times are hours:minutes:seconds,milliseconds with a comma before the milliseconds, and two digits for hours.

The text is one or more lines. Two lines per cue is the practical maximum.

The blank line ends the cue. It is what tells a parser that the next number starts a new cue.

Formatting tags

SRT has no formal styling, but these tags are widely supported:

  • <i>italic</i>, <b>bold</b>, <u>underline</u>
  • <font color="#ffff00">yellow</font> — supported by many desktop players, ignored by others

Some files also contain positioning codes from other formats, such as {\an8} to place a line at the top of the screen. Support for these varies.

Variations you will meet

Because SRT was never standardised, files in the wild differ:

  • Dots instead of commas in timestamps, borrowed from WebVTT.
  • Missing or wrong numbers, usually after cues were deleted or merged by hand.
  • Extra blank lines between cues, or none at all where two cues run together.
  • Mixed line endings — Windows (CRLF) and Unix (LF) in the same file, often after editing on different systems.
  • A byte-order mark at the start of the file, invisible in most editors.
  • Legacy encodings instead of UTF-8, which garble accented letters — see fixing encoding problems.

Tolerant parsers accept all of these. Strict ones, including some TVs and editing tools, fail on them.

Mistakes that break players

The problems most likely to make a player skip lines or reject a file are:

  • Overlapping cues: a cue starting before the previous one ends.
  • End before start: a cue whose end time is earlier than its start time.
  • Out-of-order cues: a later cue with an earlier start time.
  • Empty cues: a timing line with no text.

The Fix Subtitles tool lists each of these with the cue number and repairs them automatically, and the subtitle editor highlights overlaps and timing errors as you edit, so you can fix them by hand while seeing the context.