What an SRT file is and why you need one

An SRT file is a plain-text document that holds subtitle or caption timing and text. The letters stand for "SubRip," the software that first used this format. When you play a video in most players — VLC, YouTube, or a streaming service — the subtitles you see come from an SRT file sitting alongside the video file or embedded in it.

SRT files are simple enough that you can create one in any text editor: Notepad on Windows, TextEdit on Mac, or gedit on Linux. The format has only three parts per subtitle: a sequence number, a timestamp showing when the text appears and disappears, and the text itself. Because the format is so basic and widely supported, SRT files work across almost every video platform and player.

You might create an SRT file if you're uploading a video to YouTube and want to add captions, if you're making a film or presentation with subtitles, or if you're translating existing subtitles into another language. You can also use SRT files to add captions to videos you watch locally on your computer.

Key Takeaways

  • An SRT file is a text document with three parts per subtitle: a number, a timestamp in the format HH:MM:SS,mmm, and the subtitle text.
  • You can create an SRT file in any text editor and save it with the .srt extension, as long as you follow the exact spacing and format rules.
  • The timestamp shows when each subtitle appears and disappears, separated by an arrow: 00:00:05,000 --> 00:00:10,000 means the text shows from 5 seconds to 10 seconds.
  • Most video players and platforms read SRT files automatically if the file has the same name as the video and sits in the same folder.

The exact structure of an SRT file

Every subtitle in an SRT file follows the same four-line pattern. The first line is a number starting at 1 and counting up. The second line is the timestamp. The third line is the subtitle text. The fourth line is blank.

Here is a real example of what the first three subtitles in an SRT file look like:

1 00:00:05,000 --> 00:00:10,000 Welcome to the tutorial. 2 00:00:10,500 --> 00:00:15,200 Today we'll learn how to edit video. 3 00:00:15,500 --> 00:00:20,000 First, open your editing software.

The timestamp format is always HH:MM:SS,mmm where HH is hours, MM is minutes, SS is seconds, and mmm is milliseconds. The comma separates seconds from milliseconds — not a period. The arrow between the start and end time has spaces around it: --> with a space before and after. If you use a period instead of a comma, or forget the spaces around the arrow, the file will not work.

The subtitle text can be one line or multiple lines. If you have two lines of text, press Enter once between them. Leave a blank line between each subtitle block. That blank line is required — without it, the next subtitle number will not be recognized.

How to create an SRT file step by step

Open a text editor. On Windows, right-click on your desktop, choose New, and select Text Document. On Mac, open Applications > Utilities > TextEdit, then go to Format menu and change it from Rich Text to Plain Text. On Linux, open your text editor from the applications menu.

Type your first subtitle block following the pattern above: number, timestamp, text, blank line. Watch your video while you type so you can time each subtitle correctly. Pause the video at the moment a line of dialogue begins, note the timestamp, then pause again when it ends. Write those times in the HH:MM:SS,mmm format.

Continue adding subtitles in order, numbering each one sequentially. Leave a blank line between each block. When you finish, save the file with the .srt extension. On Windows, choose File > Save As, type a filename like subtitles.srt, and make sure the file type is set to All Files. On Mac, use File > Save and type the .srt extension in the filename. Do not save it as a .txt file — it must be .srt.

Place the SRT file in the same folder as your video file and give it the same name. If your video is called "tutorial.mp4", name your SRT file "tutorial.srt". Most video players will automatically detect and load the subtitles when you play the video.

Tools that can help you time subtitles accurately

Timing subtitles by hand is tedious and error-prone. Several free tools can make the process faster. Subtitle Edit is a free program for Windows and Linux that lets you play the video in one panel while you type subtitles in another. It shows you the exact timestamp as you watch, and you can click buttons to mark when each subtitle starts and stops.

Aegisub is another free option that works on Windows, Mac, and Linux. It also plays video alongside the subtitle editor and lets you set timestamps by clicking buttons or using keyboard shortcuts. Both programs can import existing subtitle files and let you adjust timing if your subtitles are slightly off.

If you already have subtitles in another format — like .vtt or .ass files — you can convert them to SRT using online converters or the tools above. However, if you are creating subtitles from scratch, a dedicated subtitle editor will save you hours compared to timing everything manually in a text editor.

How to test your SRT file before uploading

Before you upload your video anywhere, test the SRT file locally on your computer. Download VLC Media Player, which is free and works on Windows, Mac, and Linux. Open your video file in VLC, then go to Subtitle > Open/Load Subtitle File and select your SRT file. Watch a few minutes of the video and check that the text appears at the right moments and disappears when it should.

Look for timing issues: subtitles appearing too early or too late, text staying on screen too long, or text disappearing before the speaker finishes talking. If you spot problems, open your SRT file in the text editor again and adjust the timestamps. Subtract a few hundred milliseconds from the start and end times if subtitles are appearing too late, or add milliseconds if they are appearing too early.

Also check that your text is readable and makes sense. Subtitles should be short enough to read quickly — usually no more than two lines. If a line is very long, break it into two lines by pressing Enter in the middle of the subtitle text block.

Uploading SRT files to video platforms

On YouTube, upload your video first. Once it finishes processing, go to the video details page and click Subtitles. Choose Add Language, select your language, then choose Upload a File. Select your SRT file and YouTube will import it. You can preview the subtitles before publishing them.

On Vimeo, upload your video, then go to Settings > Subtitles and Captions. Click Add Subtitles, choose your language, and upload your SRT file. Vimeo will process it and show you a preview.

If you are embedding a video on your own website, you will need to use HTML5 video code. Add a line like <track kind="subtitles" src="subtitles.srt" srclang="en" label="English"> inside your video tag. Make sure the SRT file is in the same folder as your HTML file, or provide the full path to where it is stored.

Common mistakes that break SRT files

The most common error is using the wrong timestamp format. Remember: HH:MM:SS,mmm with a comma, not a period. 00:00:05.000 will not work. 00:00:05,000 will. The arrow must have spaces: --> not --> or --> .

Another frequent mistake is saving the file as .txt instead of .srt. Even if the content is correct, a .txt file will not be recognized as a subtitle file by most players. Always check the file extension in your save dialog.

Forgetting the blank line between subtitle blocks is also common. Without that blank line, the parser will not recognize where one subtitle ends and the next begins. Every subtitle block must be followed by a completely empty line.

Finally, some people accidentally save SRT files with special formatting from rich-text editors like Microsoft Word. Always use a plain-text editor. If you use Word, the file will contain hidden formatting codes that break the subtitle timing.

Frequently Asked Questions

Can I use special characters or emojis in an SRT file?

You can use most special characters, but save your file as UTF-8 encoding to avoid problems. In most text editors, go to File > Save As and look for an encoding dropdown. Choose UTF-8. Emojis will display in most modern video players, but some older players may not support them. Test on the platform where you plan to use the file.

What if my subtitles are out of sync with the video?

Open your SRT file and adjust all the timestamps by the same amount. If subtitles are 2 seconds late, add 2000 milliseconds to every start and end time. If they are 500 milliseconds early, subtract 500 from every timestamp. Subtitle Edit and Aegisub have built-in tools to shift all timings at once, which is faster than editing each one manually.

Can I have multiple subtitle tracks in one SRT file?

No. One SRT file holds subtitles for one language. If you need subtitles in English and Spanish, create two separate SRT files: subtitles_en.srt and subtitles_es.srt. Upload both to your video platform and viewers can choose which language they want.

What is the maximum length for subtitle text?

There is no hard limit, but most players display subtitles best when they are two lines or fewer. If your text is longer, break it into multiple subtitle blocks with slightly overlapping timestamps so the text flows naturally. Very long text blocks are hard to read quickly and may get cut off on smaller screens.

Do I need to include speaker names in the subtitle text?

You can, but it is not required. Some creators write "JOHN: Hello there" to show who is speaking. Others just write "Hello there" and let the video context show who is talking. Choose whichever style matches your video. If multiple people speak quickly, including names makes it clearer who is saying what.