SRT to VTT Converter
- SubRip has no published specification and no registered media type. This converter matches the shape every player follows rather than implementing a standard, so the SubRip half of every rule here is convention.
- The SubRip index numbers were dropped. DFCF19: WebVTT cue identifiers are optional, and where they appear each one must be unique — so an SRT to VTT conversion can drop them, and this one does.
- A WEBVTT line and a blank line were added at the front. DFCF18: every WebVTT file opens with the string WEBVTT and the specification requires two or more line terminators between that line and the rest of the file; a SubRip file has no header line, so converting to WebVTT means adding one.
- The output must be saved as UTF-8 and labelled text/vtt (FMT-webvtt-encoding). A SubRip file declares no encoding at all (FMT-subrip-encoding), which is why accented characters in an SRT file can arrive as the wrong characters.
Going the other way? Convert VTT back to SRT →
How do you convert SRT to VTT?
SRT to VTT adds a header line and changes one character per timestamp: the comma before the milliseconds becomes a full stop.
- Paste the SubRip file above, or open it and copy it in. Each cue is an index line, a timing line, one or more text lines and a blank line.
- Put the line WEBVTT and a blank line at the top of the output, because every WebVTT file opens with it.
- Replace the comma before the milliseconds with a full stop in both timestamps of every cue.
- Decide whether the index numbers come across as cue identifiers, then save the result as UTF-8 with a .vtt extension.
This page writes a WEBVTT header line, a blank line, then every cue with the comma in both timestamps replaced by a full stop.
SRT to VTT Conversion Table
Six parts of a subtitle file, and what happens to each one. Only one of them is a change to the text you can see. The timestamp difference between the two subtitle formats is one character: SubRip writes a comma before the milliseconds and WebVTT writes a full stop. 00:00:01,500 in SubRip is 00:00:01.500 in WebVTT.
| SubRip part | WebVTT part | What changes |
|---|---|---|
| none | a WEBVTT header line | one line and a blank line are added |
| a sequential index number on every cue, counted from 1 | optional; where present it must be unique across the file | dropped, unless you keep them |
| HH:MM:SS,mmm | [HH:]MM:SS.mmm | the comma becomes a full stop |
| always written | optional; required only when the hours are not zero, and then two or more digits | nothing; the hours are kept |
| sometimes display coordinates | cue settings after the end timestamp | coordinates are dropped |
| none - the format carries no encoding declaration | UTF-8 | the output has to be saved as UTF-8 |
A format is defined by what it can say. The rows below put the two halves of this conversion side by side, so the gap the conversion has to cross is a thing you can read rather than a thing you find out later. Every value in the table is the wording the defining document uses, not a summary of it, and a dash means the format has no answer to that row at all.
| What it says | SubRip | WebVTT |
|---|---|---|
| Specification | none published - the format is defined by the behaviour of the SubRip program and by convention | W3C WebVTT: The Web Video Text Tracks Format, Candidate Recommendation Draft, 20 May 2026 |
| Media type | none registered | text/vtt |
| Structure | cue blocks of an index line, a timing line, one or more text lines and a blank line | a WEBVTT header line, then region, style, comment and cue blocks separated by line terminators |
| Header line | none | — |
| Timestamp | HH:MM:SS,mmm | [HH:]MM:SS.mmm |
| Fraction mark | a comma | U+002E FULL STOP |
| Hours field | — | optional; required only when the hours are not zero, and then two or more digits |
| Timing line | — | the string --> surrounded by one or more spaces or tabs |
| Cue identifier | a sequential index number on every cue, counted from 1 | optional; where present it must be unique across the file |
| Line terminator | — | CRLF, LF or CR |
| Comment | none | a NOTE block |
| Encoding | none - the format carries no encoding declaration | UTF-8 |
Worked Example: SRT to VTT
One cue, converted here at build time by the same code the box above runs. The working under it shows the timing line that went in, the decision taken, and the timing line that came out.
1
00:00:01,500 --> 00:00:04,000
Hello
WEBVTT
00:00:01.500 --> 00:00:04.000
Hello
Result: the SubRip above is the WebVTT beside it, and every decision that made it is listed below.
The payload was not touched, and that is the whole point of this pair. WebVTT was built on SubRip. The W3C specification's acknowledgements name the SubRip program's SRT file format as the basis for the WebVTT text track format, which is why the two convert into each other so cleanly.
Subtitle files are timed text, not structured data. SubRip and WebVTT carry lines of prose against timestamps; they have no fields, no keys and no nesting, which is why they convert into each other and not into JSON. Nothing here has a field or a key to map, so the conversion is a header line and a punctuation mark.
The timestamp that went in is the one shape a SubRip file is allowed. A SubRip timestamp is written HH:MM:SS,mmm - two digits each for hours, minutes and seconds, then a comma and three digits of milliseconds. SubRip has no published specification and no registered media type, so this is the shape every player follows rather than a rule anyone wrote down.
Check it in reverse
Going back is the same edit in the other direction, and it is exact for a file this simple. The header line comes off, the cues are numbered from 1 in the order they appear, and the full stop before the thousandths becomes a comma again. A cue identifier that was not a number cannot survive that, because the SubRip convention is a sequential index and nothing else.
To prove nothing was lost, convert the VTT result back to SRT and compare it with the file you started from.
What This Conversion Cannot Carry
The direction that adds a header and drops a number is still lossy, and the converter says where. A WebVTT file must be encoded as UTF-8 and labelled text/vtt. A SubRip file declares no encoding at all, which is why accented characters in an SRT file can arrive as the wrong characters.
- The SubRip side of every rule here
- SubRip has no published specification and no registered media type. This converter matches the shape every player follows rather than implementing a standard, so the SubRip half of every rule here is convention.
- The index numbers
- The SubRip index numbers were dropped. DFCF19: WebVTT cue identifiers are optional, and where they appear each one must be unique — so an SRT to VTT conversion can drop them, and this one does.
- The header line WebVTT requires
- A WEBVTT line and a blank line were added at the front. DFCF18: every WebVTT file opens with the string WEBVTT and the specification requires two or more line terminators between that line and the rest of the file; a SubRip file has no header line, so converting to WebVTT means adding one.
- The encoding the output needs
- The output must be saved as UTF-8 and labelled text/vtt (FMT-webvtt-encoding). A SubRip file declares no encoding at all (FMT-subrip-encoding), which is why accented characters in an SRT file can arrive as the wrong characters.
- Display coordinates after the end timestamp
- Text followed the end timestamp ("X1:40"). SubRip files sometimes carry display coordinates there; nothing in WebVTT holds them, so they were dropped.
- A cue with no index line
- A cue arrived without an index line. FMT-subrip-cue-identifier records the convention as a sequential number on every cue, so one was supplied on the way out.
Each line above is written by the converter itself, and it appears under your own result whenever your document raises it. Nothing is dropped without one.
The sample above reverses exactly - write the same cues back out as SubRip .
What Else Changes Besides the Timestamps?
Whether the cue numbers come across
They are dropped by default and kept if you ask. WebVTT cue identifiers are optional, and where they appear the specification requires each one to be unique. SubRip numbers its cues in order by convention, so a VTT to SRT conversion adds the numbers and an SRT to VTT conversion can drop them.
What the timestamp is allowed to look like
WebVTT is looser than SubRip about the hours field, so a valid conversion has more than one correct form. A WebVTT timestamp is two-digit minutes, two-digit seconds, a full stop and three digits of thousandths, with the hours field optional and required only when the hours are not zero. Both 01:30.000 and 00:01:30.000 are valid WebVTT.
What the header line has to be
Exactly the string WEBVTT, followed by a blank line. Every WebVTT file opens with the string WEBVTT, and the W3C specification requires two or more line terminators between that line and the rest of the file. A SubRip file has no header line, so converting to WebVTT means adding one.
SRT to VTT in Code
The same conversion in two lines, one per language. Both add the header and rewrite the timestamps; neither drops the indexes. Neither line reports what the conversion could not carry; the converter above does.
Python: open("out.vtt","w").write("WEBVTT\n\n" + re.sub(r"(\d\d:\d\d:\d\d),", r"\1.", srt)) JavaScript: "WEBVTT\n\n" + srt.replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, "$1.$2") Common Mistakes
- Leaving the comma in the timestamps. A player expecting WebVTT reads the timing line as malformed and shows no captions, with no error you can see.
- Saving the result as anything but UTF-8. A SubRip file declares no encoding, so an accented character can arrive wrong and stay wrong.
- Putting only one line break after WEBVTT. The specification asks for two or more, and a file with one is not WebVTT.
Frequently Asked Questions
What is the difference between SRT and VTT?
One character in every timestamp, one header line, and what each format can carry beyond the text. WebVTT adds cue settings, styling and comments; SubRip has none of those.
Does YouTube use SRT or VTT?
It accepts both on upload. A browser playing video with a track element needs WebVTT, which is the usual reason to convert a SubRip file in the first place.
Do the cue numbers have to be removed?
No. Cue identifiers are optional in WebVTT, and where they appear each one must be unique. This page drops them by default and keeps them if you ask.
Which encoding does a VTT file need?
UTF-8, and the file should be served as text/vtt. A SubRip file declares no encoding at all, which is why accented characters can arrive as the wrong characters.
Can I convert SRT files to VTT files online?
This page does it in your browser: the file is not uploaded anywhere. Paste the cues in, read the working, and copy the result out.
Yes. The same file converts straight back in the VTT to SRT direction .
Related Conversions
The rest of the family sits on the subtitle and data format index.