What an SRT file is
An SRT file is plain text. You can open it in Notepad or TextEdit and read every line. It holds the words of your video plus the times each caption should appear and disappear. Nothing else.
That simplicity is why it travels so well. YouTube Help lists SubRip (.srt) as a supported basic caption format, and most video editors and caption vendors can export it. The Library of Congress notes that SRT was the basis for WebVTT, the caption format built for web players.
SRT works more like a shared habit than a strict standard. The details below are what players and upload tools expect in practice. If you follow them, your file should load and time correctly.
The four parts of every SRT block
An SRT file is a stack of blocks. Each block is one caption, and each has four parts in this order:
- Sequence number. A counter that starts at 1 and goes up by one for each block.
- Timestamp line. Start time, a space, two hyphens and a greater-than sign, a space, then end time.
- Caption text. One or two lines of what viewers read on screen.
- Blank line. An empty line that tells the player this block is finished.
Here is an SRT caption file example. It is made up, for a short board meeting clip where the board president opens public comment and a parent speaks from the floor.
1 00:42:10,000 --> 00:42:13,500 BOARD PRESIDENT: We'll now move to public comment. 2 00:42:13,600 --> 00:42:16,200 Each speaker has three minutes. 3 00:42:16,300 --> 00:42:17,800 [gavel taps] 4 00:42:18,000 --> 00:42:21,900 PARENT (off camera): Thank you. I'm here about the bus schedule. 5 00:42:22,000 --> 00:42:24,000 [scattered applause]
Read block 1 line by line. The 1 is the sequence number. The second line says the caption appears at 42 minutes, 10 seconds and leaves at 42 minutes, 13.5 seconds. The next two lines are the text, broken where the speaker would pause. The empty line after it closes the block.
Notice what the example carries besides words: who is talking, a speaker the camera doesn't show, the gavel and the applause. That is the difference between captions and a transcript with timestamps.
SRT timestamp format
The Library of Congress describes the SRT timecode as hours, minutes and seconds, with a comma before the milliseconds. In practice that looks like 00:42:10,000. Three things trip people up.
The comma before milliseconds
SRT uses a comma, not a period, between seconds and milliseconds. Files that pass through a spreadsheet or a script sometimes come back with periods. If every timestamp in your file has a period there, you are probably looking at a WebVTT-style time, not SRT.
Hours are always shown
Even a 90-second clip needs the hours: 00:01:05,250, not 01:05,250. Each part keeps its leading zeros. Short forms can fail to load or land at the wrong time.
Overlapping or backward times
Each end time should come after its start time, and each block should start after the previous one ends. When two blocks overlap, players may stack them, flash them or drop one. This often happens when someone edits a caption's text and nudges its time by hand. Scan the timestamps in order after any manual edit.
Writing captions, not just subtitles, in SRT
WCAG 1.2.2 asks for captions on prerecorded video, and the W3C is specific about what captions are. WCAG's guidance separates captions from dialogue-only subtitles: captions also cover sound effects, music, laughter, speaker identification and location. Under the ADA Title II and Section 504 rules, which adopt WCAG 2.1 AA, a file with only the words usually falls short. Check your dates with the deadline checker.
SRT has no special field for any of this. You write it into the caption text. Pick a style and use it the same way through the whole file.
- Speaker names. Put the name or role in capitals, followed by a colon, when the speaker changes: BOARD PRESIDENT: or NURSE MARTINEZ:. Use a name only when you have confirmed the spelling.
- Off-screen speakers. DCMP says to identify both onscreen and offscreen speakers. Add a short note such as (off camera) or (on phone) after the name.
- Sound cues. Use square brackets: [applause], [music], [crowd cheering], [phone rings]. DCMP says to caption a sound effect when viewers need it to understand or enjoy the media.
- Music. Describe it briefly: [upbeat music] under a district promo, [band plays school fight song] at a game. Lyrics that matter get captioned as words.
- Silence that matters. If a pause carries meaning, such as a long silence before a vote, a cue like [no audible response] tells viewers nothing was missed.
Auto-caption downloads and many Zoom exports have none of these. Adding them is usually the biggest single fix you will make to a file. For more on what counts as acceptable quality, see caption quality standards.
Line length and readability inside SRT's limits
SRT will hold as much text in a block as you type. Viewers can't read it all. The DCMP Captioning Key prefers no more than two lines per caption, broken where speech naturally pauses, and left-aligned when a caption runs to more than one line.
A few habits keep captions readable:
- Split long sentences across two or more blocks instead of cramming one block.
- Break lines at phrases, not in the middle of a name or between an article and its noun.
- Give short captions enough time on screen to be read, even if the speaker moves on quickly.
- Keep a speaker's name on the same line as the start of what they say.
SRT vs VTT: what SRT can't do
SRT is text and time. It has no header, no positioning and no styling. For basic formats like SRT, YouTube reads only the plain version and ignores any styling markup, so italics or color tags a vendor adds may simply disappear.
WebVTT (.vtt) is the closer cousin with more control. Under the W3C WebVTT spec, a file must open with the string WEBVTT, and it defines cue settings for position, line, alignment and size. SRT has none of that. YouTube lists WebVTT among its advanced formats.
| Situation | Better file | Why |
|---|---|---|
| Plain captions for a YouTube upload | SRT | Simple, widely exported, easy to check by eye |
| Captions would cover on-screen text, like a name banner or a slide | WebVTT | Cue settings can move the caption box |
| Video embedded in your own website player | WebVTT | Web players are built around it |
| Vendor or Zoom only gives you one format | Whatever you got | Check it first; convert only if you need to |
Common SRT errors to fix before you upload
Most broken SRT files fail in a handful of ways. Open the file in a plain text editor, not Word, and look for these.
- 1
Check the encoding
Save the file as UTF-8. Other encodings can turn accented names, Spanish text and curly punctuation into garbled characters. In most text editors, the encoding is a choice in the Save As dialog.
- 2
Look for missing blank lines
Every block needs an empty line after its text. Without it, the next sequence number and timestamp can show up as caption text, or the block can be skipped.
- 3
Check the numbering
Numbers should run 1, 2, 3 with no gaps or repeats. Gaps often appear after someone deletes a block by hand. Many caption editors can renumber the file for you.
- 4
Fix the timestamp punctuation
Look for periods where commas belong, missing hours, single-digit fields and arrows typed as a dash and a greater-than sign or as a single arrow character.
- 5
Remove word processor damage
If the file was opened in Word, smart quotes, long dashes and hidden formatting can sneak in, or the file may have been saved as .docx or .txt. Retype the arrows if needed and save as plain text with the .srt extension.
- 6
Delete stray markup
Tags like <i> or <font> may be ignored on YouTube. Remove them unless you know your player uses them.
Checking an SRT from auto-captions or a vendor
A file that loads is not the same as a file that's right. Before you upload, play the video with the SRT open beside it and check:
- Names. Board members, principals, students, clinic staff. Auto-captions guess at names, and a wrong student name is worse than none.
- Drug names and doses. In patient education video, one wrong word can change the meaning. See patient education video captions.
- Speaker changes. Every new voice gets a label, including people off camera.
- Sound cues. Applause, music, the gavel, alarms: anything a viewer needs to follow along.
- Sync. Spot-check the start, middle and end. If everything is late by the same amount, the whole file needs shifting, not each block.
For why YouTube's automatic captions alone often aren't enough, see are YouTube auto-captions ADA compliant? This post explains the format and the rules as published; it isn't legal advice. When the file is ready, follow the upload steps in how to add captions to YouTube videos.
Sources
- YouTube Help (Google)
- W3C Web Accessibility Initiative
- Library of Congress, Sustainability of Digital Formats
- W3C WebVTT: The Web Video Text Tracks Format
- Described and Captioned Media Program (DCMP)
- Described and Captioned Media Program (DCMP)
This is a reading of the rules, not legal advice. Something out of date? Tell us and we'll fix it.