File types · Explainer

The SRT file (.srt)

An SRT file is a plain-text subtitle file: numbered captions, each with a start time, an end time and the words to show. This guide explains what's inside one, how players pair it with a video, the problems worth knowing, and has free sample SRT files to download for testing.

At a glance

Full name
SubRip Subtitle file (SubRip Text)
Extensions
.srt
MIME type
None registered. application/x-subrip is common; servers often send text/plain
Kind
Plain text: timed captions, one block per cue
Standard
None. A de facto format, defined by what the SubRip program wrote and players accept
Origins
About 2000, as the output of SubRip, a Windows program that read subtitles off video with OCR
Timestamp
HH:MM:SS,mmm, with a comma before the milliseconds
Encoding
Not specified. UTF-8 today; older files are often Windows-1252 or another code page
Opens with
VLC, mpv, most TV and media players, YouTube and video editors; any text editor
Magic number
None; most files start with 1, a line break and 00:

The basics

What is an SRT file?

An SRT file holds the subtitles of a video as plain text: what to show, from when, until when. It doesn't contain the video, and the video doesn't contain it; the two travel side by side. Download subtitles for a film, export captions from a transcription tool or caption editor, or rip them from a DVD, and you usually get an .srt file.

The name comes from SubRip, a Windows program from about 2000 that read the subtitles burned into video frames with optical character recognition and saved the text and times. Its output was so simple that everything started to read it, and it became the most widely supported subtitle format, from desktop players and smart TVs to YouTube, Vimeo and LinkedIn.

That simplicity is also the catch. There is no official specification: no standards body ever wrote SRT down, so details such as the character encoding, which formatting tags work, and how strict to be about blank lines and numbering are left to each program. The WebVTT format used by web browsers was based on SRT and fills those gaps.

Anatomy

What's inside an SRT file

An SRT file is a list of cues. Each cue is a number, a timing line and one or more lines of text, and a blank line ends it. There is no header, no styling section and no metadata. Here are three cues, part by part.

movie.srt
1
00:00:01,000 --> 00:00:03,500
Hello, and welcome.

2
00:00:04,000 --> 00:00:06,250
This cue has <i>italic</i> text
and runs over two lines.

3
00:01:02,040 --> 00:01:05,000
[Door slams]
  1. 11

    The cue number

    A counter that starts at 1 and goes up by one. Players mostly go by the times, but strict parsers can reject a missing or out-of-order number, so renumber after deleting cues.

  2. 200:00:01,000

    The start time

    Hours, minutes, seconds and milliseconds, measured from the start of the video. The separator before the milliseconds is a comma. WebVTT uses a full stop instead, which makes this the most common mistake when converting between the two by hand.

  3. 3 -->

    The arrow

    Two hyphens and a greater-than sign, with a space on each side, between the start and the end time.

  4. 400:00:03,500

    The end time

    When the text disappears. A cue that ends after the next one starts overlaps it; many players then show both, stacked.

  5. 5Hello, and welcome.

    The text

    Shown at the bottom of the picture, centred, in whatever font and size the player chooses. SRT itself says nothing about appearance.

  6. 6(blank line)

    The end of the cue

    An empty line separates cues. A missing blank line glues two cues together, so the second cue's number and times show up as text.

  7. 7This cue has <i>italic</i> text

    Formatting tags

    HTML-like <i>, <b>, <u> and <font color> are widely understood but were never standardised. Some players and sites (YouTube among them) ignore them; a few show them as raw text.

  8. 8and runs over two lines.

    A second line

    Line breaks in the file are line breaks on screen. Two short lines per cue is the usual style, so viewers can read a cue at a glance.

  9. 900:01:02,040

    Times past a minute

    Every field keeps its leading zeros, so a time is always written in full, as 00:01:02,040, even when the hours are zero.

  10. 10[Door slams]

    A sound description

    Not a feature of the format, just a convention: captions for deaf and hard-of-hearing viewers describe sounds in square brackets.

Under the hood

How a player finds and shows an SRT file

  1. 1It looks for a file with the same name. Put holiday.srt next to holiday.mp4 and VLC, mpv, Plex, Kodi and most smart TVs load it automatically. A language code before the extension, as in holiday.en.srt or holiday.nl.srt, lets many players offer several languages.
  2. 2Or you add it by hand: in VLC, Subtitle, Add Subtitle File; or drag the .srt onto the playing video.
  3. 3It decodes the text, ideally as UTF-8. With an older file in another encoding, the player either guesses the code page or shows garbled letters.
  4. 4It parses the cues into a list of start time, end time and text, and at each moment draws the cues whose time range includes the current playback time.
  5. 5It draws the text itself, in its own font, size and position. That's why the same file looks different in VLC, on a TV and on YouTube.

Browsers don't play SRT

The HTML <track> element only accepts WebVTT. To show subtitles on a web page, convert the SRT to VTT first: the change is small, and ffmpeg -i subs.srt subs.vtt does it.

Delivery

Soft subtitles vs burned-in subtitles

There are three ways to get SRT subtitles in front of viewers, and they behave very differently:

Sidecar `.srt` fileTrack inside the video fileBurned in
What it isA separate file next to the videoThe text stored as a subtitle stream in MKV or MP4The letters drawn into the video frames
Viewer can switch it offYesYesNo
Several languagesOne file per languageSeveral tracks in one fileOne version of the video per language
Can be edited laterYes, in a text editorExtract, edit, put backNo, re-encode the video
Works everywhereOnly where the player looks for itDepends on the player and containerYes: it's just pixels
  • Add it as a track to an MKV: ffmpeg -i video.mp4 -i subs.srt -map 0 -map 1 -c copy -c:s srt out.mkv. MKV stores SRT text as it is.
  • Add it as a track to an MP4: use -c:s mov_text instead. MP4's text format is simpler, and players differ in how they handle the formatting tags.
  • Burn it in: ffmpeg -i video.mp4 -vf subtitles=subs.srt -c:a copy out.mp4. This re-encodes the video and needs an FFmpeg built with libass, which draws the text. Social media clips are often burned in because many apps autoplay without sound and ignore subtitle files.

Styling

Formatting and positioning: what SRT can and can't do

SRT has no stylesheet, no fonts and no layout. What players commonly accept is borrowed from HTML and from the ASS format, and none of it is guaranteed:

MarkupEffectSupport
<i>…</i>, <b>…</b>, <u>…</u>Italic, bold, underlineWide: VLC, mpv, most TVs, FFmpeg. YouTube ignores all markup in SRT.
<font color="#FFD700">…</font>Text colourCommon in desktop players. Often dropped on conversion: FFmpeg removed it when we converted our sample to WebVTT.
{\an8} at the start of a cueMoves the cue to the top centre (the number is a keypad position: 1 to 9)An ASS override tag. VLC, mpv and FFmpeg's subtitle renderer honour it (FFmpeg did in our test); other players ignore it or show it as text.

If you need real styling, positioning or karaoke effects, use WebVTT for the web or ASS for desktop players, and keep an SRT version for everything else.

Related formats

SRT vs WebVTT vs ASS

SRTWebVTT (`.vtt`)ASS / SSA (`.ass`, `.ssa`)
SpecificationNoneW3C WebVTTInformal, defined by tools (SubStation Alpha, Aegisub, libass)
First lineThe first cue numberWEBVTT[Script Info]
Timestamp00:00:01,00000:00:01.000 or 00:01.0000:00:01.00 (centiseconds)
EncodingNot definedUTF-8 onlyNot defined; UTF-8 usual
StylingA few unofficial tagsCSS through ::cue, classes, voicesNamed styles, fonts, outlines, effects
PositioningUnofficial {\an8}Cue settings (line, position, align)Exact coordinates, movement, rotation
Plays in web browsersNoYes, with <track>No
Best forExchanging subtitles; players and TVsWeb video and accessibilityStyled fansubs, karaoke, typesetting

Converting between them is easy as long as you only carry text and times. SRT to VTT loses nothing; VTT or ASS to SRT loses the styling and positioning. Broadcast and streaming workflows also use TTML (.ttml, .dfxp), an XML format, and SCC for US broadcast captions.

Troubleshooting

Why are my subtitles out of sync or garbled?

SymptomCauseFix
Every line is early or late by the same amountThe subtitles were timed for a different cut: an extra intro, a missing logoShift all times. In VLC, the G and H keys adjust the subtitle delay while you watch; Subtitle Edit and Aegisub can shift the file for good.
In sync at the start, drifting further off over timeFrame rate mismatch: timed for a 25 fps version, playing a 23.976 fps one (or the other way round). The gap grows to about 2.5 minutes after an hour.Stretch the timings by the ratio of the frame rates (25 / 23.976), or resync two points, one near the start and one near the end. Subtitle Edit has a Change frame rate command.
é, ’ or � instead of accented lettersThe file is in another encoding than the player assumes, typically Windows-1252 read as UTF-8Open it in an editor with the right encoding and save it as UTF-8. With FFmpeg, add -sub_charenc CP1252 before -i.
 or a strange character before the first number, or the first cue missingA UTF-8 byte order mark (EF BB BF) that the program doesn't expectSave as UTF-8 without BOM. Most players handle a BOM, but some scripts and older parsers don't.
A cue number and times appear on screenA missing blank line between two cuesAdd the blank line; a subtitle editor's error checker finds them all.
Nothing loads at allA full stop instead of the comma in the times, -> instead of -->, or the file name doesn't match the videoFix the timing lines, or rename the file to match the video exactly.

Line endings rarely matter: players accept both Windows-style CRLF and Unix-style LF. They matter to scripts that split the file on \n\n to find cues, which then fail on CRLF files. Our samples include both kinds.

How to

How to open, edit and convert an SRT file

  • Watch with it: give it the same name as the video and keep both in one folder, then open the video in VLC (Windows, Mac, Linux, Android, iPhone) or mpv. On a smart TV, copy both files to the same folder on a USB stick.
  • Read or fix it: any text editor works. Save as UTF-8 and keep the blank lines.
  • Edit timing and text: Subtitle Edit (Windows, free), Aegisub (Windows, Mac, Linux, free) and most video editors import and export SRT, with waveforms that make timing easier.
  • Convert to WebVTT for the web: ffmpeg -i subs.srt subs.vtt, or by hand: add a WEBVTT line at the top and change the commas in the times to full stops.
  • Upload to YouTube: YouTube accepts SRT in plain UTF-8 and ignores formatting tags.
  • Turn speech into an SRT: transcription tools and speech-to-text services export SRT directly; always check names, numbers and timing by hand.

Security

Is it safe to open an SRT file?

An SRT file is text and can't run anything by itself. The risk is in the player that parses it. In 2017 Check Point researchers showed that crafted subtitle files could exploit flaws in VLC, Kodi, Popcorn Time and Stremio and take over the device, and that they could push such files to the top of shared subtitle sites so players downloaded them automatically. All four projects fixed the flaws.

Keep media players updated, and be wary of subtitle downloads that come as .exe, .scr or .zip files with a program inside: a real subtitle file ends in .srt and opens in Notepad.

Free downloads

Sample SRT files to download

Free sample SRT files, timed to our 10-second sample MP4 (sample-720p-h264-aac.mp4), for testing players, parsers, converters and encoding detection. Every file parses with the Python srt and pysrt libraries (the Windows-1252 one once decoded as Windows-1252) and converts to WebVTT with FFmpeg.

sample-720p-h264-aac.srt · 491 bytesDownloadOpen
Loading…

What's inside sample-720p-h264-aac.srt

SRT has no comments, so the file explains itself through its cues. It has the same base name as the sample video: download both into one folder, open the video in VLC or mpv, and the subtitles load by themselves.

  1. Cue 1: two lines

    Runs from 00:00:00,000 to 00:00:01,900, with a line break that the player keeps.

  2. Cue 2: a sound description

    Describes the steady 440 Hz and 660 Hz test tone in square brackets, as captions for deaf and hard-of-hearing viewers do.

  3. Cue 3: what's on screen

    Names the colour bars of the test pattern, from 4 to 5.9 seconds.

  4. Cues 4 and 5: gaps of 100 ms

    Cue 4 ends at 00:00:07,500 and cue 5 starts at 00:00:07,600, so you can see whether a player clears the screen between cues.

  5. Cue 6: the last second

    Ends at exactly 00:00:10,000, the length of the video. A player that cuts it short or keeps it after the end is rounding times.

  6. The bytes

    UTF-8 without a byte order mark, LF line endings, no tags: the plainest form of the format, which every SRT reader should accept.

All sample SRT files

  • English subtitles for the sample MP4

    sample-720p-h264-aac.srt · 491 bytes

    Six cues timed to our 10-second 720p sample video, describing the test pattern, the tone and the beep. UTF-8, LF, no BOM.

    • Checking that a player picks up a same-named subtitle file
    • A minimal, valid SRT for parser tests
  • Formatting tags and positioning

    sample-formatting.srt · 521 bytes

    <i>, <b>, <u>, nested tags, <font color>, the unofficial {\an8} top-position tag, a two-speaker cue with hyphens, and a literal < and & that aren't tags.

    • Seeing which tags a player or site honours
    • Testing what a converter keeps or drops
  • Non-Latin scripts, UTF-8 with BOM

    sample-multilingual-utf8-bom.srt · 735 bytes

    Greek, Russian, Hebrew, Arabic, Chinese, Japanese, Korean, Hindi and Thai. Starts with the UTF-8 byte order mark EF BB BF and uses Windows CRLF line endings.

    • Font coverage and right-to-left text in players
    • BOM and CRLF handling in parsers
  • Legacy Windows-1252 encoding

    sample-windows-1252.srt · 486 bytes

    French, German, Spanish and Dutch accents, the euro sign, curly quotes, an ellipsis and dashes in Windows-1252, with CRLF. It is not valid UTF-8: decoded as UTF-8 it shows � characters, and FFmpeg drops the affected cues unless you add -sub_charenc CP1252.

    • Testing encoding detection
    • Reproducing garbled-subtitle bugs

Ways to test with them

  • Auto-loading: download sample-720p-h264-aac.srt and the sample MP4 into one folder and open the video. The first cue should appear at once, without adding the file by hand.
  • Timing precision: step through the video frame by frame: cue 4 should disappear at 7.5 seconds and cue 5 appear at 7.6, with one blank frame or more in between.
  • Encoding detection: import sample-windows-1252.srt and sample-multilingual-utf8-bom.srt. Both should come out readable, with no Ã,  or �.
  • Conversion: run the files through your converter to VTT and back, and compare. Times and text should survive; tags may not.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have an SRT file? Give it a link.

Drop an SRT file on 99helpers and it gets its own web address. Anyone who opens the link reads the subtitles as plain text in their browser, ready to check, copy or download.

Questions

SRT files, frequently asked

What is an SRT file?

A plain-text subtitle file. It lists numbered cues, each with a start time, an end time and the text to show, and players display them over the video.

How do I open an SRT file?

To read it, open it in any text editor. To watch it, give it the same name as the video, put both in one folder and open the video in VLC or another player; it loads automatically.

How do I add an SRT file to a video?

Keep it as a separate file with a matching name, add it as a subtitle track to an MKV or MP4 with FFmpeg or MKVToolNix, or burn it into the picture with FFmpeg's subtitles filter or HandBrake.

What's the difference between SRT and VTT?

WebVTT is based on SRT. It starts with a WEBVTT line, uses a full stop instead of a comma in the times, must be UTF-8, and adds styling and positioning. Browsers only play VTT.

Why are my subtitles out of sync?

A constant offset means a different cut of the video: shift all times. Drift that grows over time means a frame rate mismatch, such as 25 vs 23.976 fps: stretch the timings or resync two points.

Why do my subtitles show strange characters?

The file is in a different encoding from the one the player assumes, usually an old Windows code page read as UTF-8. Reopen it with the right encoding and save it as UTF-8.

Can I edit an SRT file in Notepad?

Yes. Keep the number, timing line and blank line of each cue intact and save as UTF-8. For retiming, a subtitle editor such as Subtitle Edit or Aegisub is easier.

Can an SRT file contain a virus?

The text itself can't run, but crafted subtitle files have exploited bugs in media players. Keep players updated, and don't run anything that came with a subtitle download.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.