What is an SRT file?
An SRT file is a plain-text subtitle file, a numbered list of lines with the time each one appears and disappears. Almost every video player, TV, video editor and video site can read it.
A complete SRT file
This is a complete, valid SRT file with one subtitle. The line "Where were you?" appears one second into the video and disappears at three and a half seconds.
1
00:00:01,000 --> 00:00:03,500
Where were you?
That is all the format needs; sample subtitle files has a longer one to download, with WebVTT and ASS versions and broken files to test with. A real file simply has hundreds or thousands of these blocks, one after another. SRT is short for SubRip, the name of an old Windows program that copied subtitles from DVDs into text files. The program is long gone, but its simple file format became one of the most widely supported subtitle formats.
Anatomy of a subtitle
Here are two subtitles, so you can see how one block ends and the next begins:
1
00:00:01,000 --> 00:00:03,500
Where were you?
2
00:00:04,200 --> 00:00:06,800
<i>Out.</i>
Don't wait up.
Each block has four parts:
- The number. It counts up from 1. Players barely use it, but many programs look for it, alone on its line, to find where a subtitle starts.
- The timing line. The start time, then an arrow, then the end time. Each time is written as hours, minutes, seconds and milliseconds:
00:00:04,200means 4.2 seconds into the video. - The text. One or two lines, sometimes more. Simple tags such as
<i>for italics are allowed. - An empty line. It ends the subtitle, so the next number can start the next one.
The rules players enforce
There is no official standard for SRT, so each player decides what it accepts. Files that follow these rules work everywhere:
| Part | The rule | What goes wrong otherwise |
|---|---|---|
| Number | A whole number alone on its line, right before the timing line | Some programs do not recognize the file as SRT |
| Times | HH:MM:SS,mmm: two digits each for hours, minutes and seconds, three for milliseconds |
A time without hours, such as 01:02,500, makes VLC skip the subtitle and FFmpeg merge it into the one before |
| Arrow | --> with a space on each side |
Some programs, including FFmpeg's file check, do not recognize the timing line |
| Milliseconds | A comma before the milliseconds | VLC and FFmpeg accept a full stop too, but other programs may not |
| Empty line | One empty line after each subtitle's text | In VLC, the next subtitle can be swallowed into the previous one |
| Encoding | UTF-8 | Accented and non-Latin letters show up as é and similar garbage on some devices |
How to open an SRT file
- To read or edit the text, use any text editor: Notepad on Windows, TextEdit on a Mac, or any code editor. An SRT file is plain text, so nothing special is needed.
- To watch it with a video, put it in the same folder as the video with the same name, such as
Holiday.mp4andHoliday.srt. VLC, mpv, Plex, Jellyfin and many TVs then load it on their own. In VLC you can also use Subtitle, then Add Subtitle File. - On a phone, VLC for Android and iPhone can play SRT files with your videos.
- To check it for problems, open it in the subtitle checker. It shows broken timecodes, garbled letters and overlapping lines in about a second, and fixes the ones it safely can, on your device.
How to create an SRT file
There are three ways, depending on what you start from:
- From text you already have, such as a script or a transcript, use TXT to SRT. It splits the text into subtitles and times them from reading speed, so you only have to line them up with the video.
- By hand, type the blocks in a text editor following the rules above. Save the file as UTF-8 and make sure the name ends in
.srt, not.srt.txt. How to make an SRT file walks through it in Notepad and TextEdit, with a template. - In a subtitle editor, such as the free programs Subtitle Edit or Aegisub, you can watch the video and set each line's start and end as you go.
How to use an SRT file with a video
- On a computer or a TV, keep the subtitle next to the video with the same name. For Plex and Jellyfin, add a language code before the extension, such as
Holiday.en.srt, so the server knows the language. - On YouTube, open the video in YouTube Studio, go to Subtitles and add the file. YouTube accepts SRT. To offer it in other languages too, see how to translate YouTube captions.
- In a video editor, Premiere Pro and DaVinci Resolve import SRT files as captions.
- On a web page, the HTML video player needs WebVTT instead. Convert the file with SRT to VTT.
Common SRT problems and how to fix them
| What you see | Usual cause | Fix |
|---|---|---|
é or п instead of letters |
The file is read in the wrong encoding | Fix subtitle encoding |
| Every subtitle early or late | The file was made for another release of the video | Sync subtitles |
| Some subtitles never appear, or two run together | A broken timecode or a missing empty line | Open it in the subtitle checker: the check finds both, adds the missing empty line, repairs common timecode mistakes (such as a full stop instead of a comma, or a short arrow) and points to a timecode it cannot read |
| Two lines on screen at once, or lines missing on a Chromecast | Subtitles that overlap in time | The check flags overlaps and fixes the small ones safely |
[door creaks] and speaker names you do not want |
SDH subtitles for viewers who cannot hear | Remove SDH |
| The subtitles are in a language you do not read | The file was made for another audience | Translate subtitles, which keeps every timing |
| Nothing shows in a web player | Browsers need WebVTT, not SRT | SRT to VTT |
Frequently asked questions
What does SRT stand for?
SubRip subtitle, after SubRip, the Windows program that first saved subtitles in this format. The file extension is .srt.
Can I open an SRT file in Notepad?
Yes. It is plain text, so Notepad and every other text editor can open and edit it. When you save, choose UTF-8 as the encoding so accented letters survive.
Why is my SRT file not working?
The most common reasons are a file name that does not match the video, the wrong encoding, a broken timecode, or a missing empty line between subtitles. Opening the file in the subtitle checker finds the last three in about a second. The name you check yourself: it should match the video's, such as Holiday.srt next to Holiday.mp4.
Does SRT support styling?
A little. Most players understand <i>, <b> and <u>, and many also read <font color="..."> and {\an8}, which moves a line to the top of the screen. Desktop players such as VLC and mpv show these; some TVs and apps ignore them. For fonts, exact positions and karaoke effects, the ASS format is the one to use.