What is an SRT file? The subtitle format explained, with the fixes for broken ones
An SRT file is a plain-text subtitle file. It lists every caption in order, and each caption is four lines: a sequence number, a timecode line saying when the caption appears and disappears, the caption text, and a blank line. That is the whole format, which is why SRT has outlasted dozens of richer subtitle formats: any text editor can open it, every video player and platform can read it, and when it breaks you can see exactly where. This guide explains each part, compares SRT with WebVTT, and covers the four ways SRT files go wrong and how to repair each one in a browser.
What does an SRT file look like inside?
An SRT file is a sequence of numbered blocks; each block has an index line, a timecode line in the form 00:00:01,000 --> 00:00:04,000, one or more lines of caption text, and a blank line that ends the block.
1
00:00:01,000 --> 00:00:04,000
Welcome back to the channel.
2
00:00:04,200 --> 00:00:07,800
Today we are adding music to a video
without covering the dialogue.
Four rules make a file valid:
- The index counts up from 1 with no gaps and no repeats.
- The timecode is hours:minutes:seconds,milliseconds, with a comma before the milliseconds, and the arrow is two hyphens and a greater-than sign with a space on each side.
- The text may be one or two lines; a third line usually overflows the player's caption area.
- The blank line is what separates blocks. A missing blank line merges two captions into one; an extra one is harmless.
The file extension is .srt and the format's full name, SubRip, comes from the program that originally extracted subtitles from DVDs.
What is the difference between SRT and VTT?
| SRT | WebVTT (.vtt) | |
|---|---|---|
| Header | None; the file starts with the first index | Must start with the line WEBVTT |
| Millisecond separator | Comma: 00:00:01,000 |
Full stop: 00:00:01.000 |
| Cue numbers | Required and sequential | Optional |
| Styling | None in the standard (players tolerate basic tags) | Position, alignment, size and CSS-style classes |
| Where it is used | Video platforms, media players, editing software | HTML5 <video> on the web, streaming players |
The two formats carry the same captions; the differences are the header and the millisecond separator, plus VTT's styling. Converting either way is mechanical and the free subtitle converter does it in your browser, checks for overlapping cues, and can shift the whole file's timing by an offset. Nothing is uploaded; the file stays on your device.
How do you open and edit an SRT file?
Any plain-text editor opens an SRT file: Notepad, TextEdit in plain-text mode, or a code editor. Edit the caption text freely, but touch the timecodes and index numbers with care, because a single malformed line silently breaks every caption after it in some players. For anything beyond fixing a typo, use a tool that understands the format: the SRT caption cleaner re-indexes the blocks, strips leftover HTML styling tags, removes bracketed audio cues like [music] when you do not want them, and shifts timecodes by any offset, all in the browser.
Why is my SRT file out of sync, and how do I fix it?
Subtitles drift for one of two reasons: a constant offset, where every caption is early or late by the same amount and a single shift fixes it, or a rate mismatch, where the drift grows through the file because the subtitles were timed to a video at a different frame rate.
- Constant offset. The captions are all 1.5 seconds late because the video gained a title card at the front. Shift every timecode by the same amount; the caption cleaner has an offset field for exactly this.
- Growing drift. The captions start in sync and are 4 seconds off by the end. The subtitle file was made for a 25 fps cut and the video is 23.976 fps, or the video was speed-changed. Retime by the ratio of the two frame rates; the timecode calculator converts between frame rates and drop-frame timecode so you can compute the factor before applying it.
- Two-frame jitter. Some captions flash for a fraction of a second. Two cues overlap, or a cue's end time is earlier than its start. The converter flags overlapping cues so you can find them.
What are the other common SRT problems?
- Garbled characters (accented letters shown as symbols). The file is not UTF-8. Re-save it as UTF-8 without a byte-order mark; most platforms reject other encodings or display them wrong.
- Captions that never appear. The index numbering has a gap or a duplicate after a manual edit. Re-index the file.
- Tags showing on screen such as
<i>or<font>. The player does not support styling; strip the tags. - A caption that is one enormous block. A blank line was deleted, merging two cues. Restore the blank line.
- Sound cues you do not want, such as
[applause]in a clean transcript. Remove the bracketed lines; keep them for accessibility captions.
How do you make an SRT file from scratch?
Three routes. Type it, which is realistic for a 30-second clip and painful beyond that. Export it from an editor's caption track, which most desktop editors and the browser timeline editor support. Or generate the captions from the audio and export the result as SRT, the method covered in how to add captions to a video with AI, then clean the file with the tools above. Whatever the route, keep captions at or under two lines of roughly 42 characters each and on screen for at least one second, which is the pace viewers can actually read.
More on planning and finishing a video: and Drop-frame timecode explained.
Frequently Asked Questions
What program opens an SRT file?
Any text editor, any modern video player, and every major video platform's caption uploader. For editing timing or numbering, a subtitle-aware tool such as the browser-based SRT caption cleaner avoids breaking the format.
Is SRT the same as VTT?
No, but they are close. VTT starts with a WEBVTT header, uses a full stop instead of a comma before milliseconds, and supports styling and positioning. Converting between them is a mechanical change and takes seconds in a browser converter.
Why does my SRT file show strange characters?
It was saved in an encoding other than UTF-8, typically a Windows code page. Re-save the file as UTF-8 and the accented characters display correctly.
How do I shift all subtitles by a few seconds?
Apply the same offset to every timecode. The SRT caption cleaner and the subtitle converter both have an offset field that shifts the whole file forward or backward without editing lines by hand.
Turn ideas into high-definition AI video clips & timeline cuts
Generate text-to-video and image-to-video in 360p up to 4K, extend scenes per second, and assemble complete multi-track videos with auto-captions and zero desktop install.