VTT to SRT

Published Updated

Convert a WebVTT file to SRT by renumbering the cues from 1 and changing the period in each timestamp to a comma. Cue identifiers, settings and NOTE, STYLE and REGION blocks are dropped, hour-less timestamps such as 01:02.500 are read, and a block whose timestamp cannot be read is counted in a message.

What a WebVTT file can hold that SRT cannot

The W3C WebVTT specification lets a cue block start with an identifier, carry a settings list after its timings, and sit alongside comment, style and region blocks. SubRip has none of that: its structure, as Matroska's subtitle notes put it, is a number, the time span and the text. The Library of Congress entry records little to no formal documentation. Converting down means discarding the extras.

A test file, before and after

A file with a NOTE, STYLE and REGION block, a cue named intro with align and position settings, and a second plain cue produced:

Part of the VTTIn the SRT
WEBVTT - Title, NOTE, STYLE, REGIONGone
Identifier introGone
00:00:01.000 --> 00:00:03.500 align:start position:10%00:00:01,000 --> 00:00:03,500
<v Roger>Hello <c.yellow>there</c></v>Same text, tags included
Second cueNumbered 2

Feature by feature: what reaches the SRT

A generated 814-byte WebVTT file went through the tool, and through the browser's own WebVTT parser (a track element), in Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app). All three gave the same results:

In the WebVTT fileIn the SRT fileWhat the browser's parser read
Header WEBVTT - Feature test with Kind and Language linesdroppedheader, not a cue
REGION, STYLE and a two-line NOTE blockdroppednot cues
Identifier intro and the settings align:start position:10% line:0 size:50%timing kept; identifier and settings droppedidentifier intro, align start, position 10, line 0, size 50
00:03.600 --> 00:05.000 (no hours)00:00:03,600 --> 00:00:05,0003.6 to 5 seconds
<v Roger>, <c.yellow>, <b>, <i>, <u>, <ruby> and <rt> tagscopied unchangedthe same tags in the cue text
Inline timestamps such as <00:00:06.000>copied unchangedthe same
&amp;, &lt; and &nbsp;copied as writtenthe same in the cue text
A cue that starts earlier than the cue above itkeeps its file position, numbered 5listed second, by start time
100:00:00.000 --> 100:00:01.000100:00:00,000 --> 100:00:01,000360,000 seconds

The SRT is UTF-8 with no byte order mark, LF line breaks only, a blank line between cues and a newline at the end; the download type is text/plain;charset=utf-8. The same file saved with CRLF line breaks and a byte order mark gave the same 531-byte SRT.

Timing lines and blocks: the tool against the browser's parser

In the WebVTT fileThis toolChrome 157, Firefox 155, WebKit build
A cue straight under the WEBVTT line, no blank line betweenconvertedread as a cue
A cue with the identifier Note 1convertedread as a cue with the identifier Note 1
NOTE a real commentdroppednot a cue
00:00:01.5 --> 00:00:02.000 (one millisecond digit)left out and counted in the noticenot a cue
1:02.500 --> 1:04.000 (one-digit minutes)converted as 00:01:02,500 --> 00:01:04,000not a cue
00:00:05,000 --> 00:00:06,000 (commas)convertednot a cue
00:00:03.000-->00:00:04.000 (no spaces)convertedread as a cue

So the tool accepts some timing lines a WebVTT player skips: a test file with the last four timing lines above and one ordinary one gave 4 cues here, where each browser read 2, and the notice said one block was left out. A file saved as Windows-1252 (Café crème, 20€) shows the not-UTF-8 warning, and its SRT has 3 replacement characters (�) where é, è and € were.

Converting a file

  1. Step 1

    Add the .vtt file

    One file at a time, read as UTF-8. The WEBVTT header line is not required; a file without one still converts. Cue text and its line breaks are copied as written.

  2. Step 2

    Press the convert button

    The file converts and downloads in one step, named after your file with .srt. A line under the button then gives the count, such as Converted 7 cues.

  3. Step 3

    Check the result in your player

    Open the .srt and look for lines starting with angle brackets, because voice and class tags are kept as written.

Timestamp forms it reads

The W3C text says the hours part of a timestamp is optional when it is zero. The converter reads both forms and writes the full one:

  • 01:02.500, minutes and seconds only, comes out as 00:01:02,500.
  • 100:00:01.000, a three-digit hour, is kept as it is.
  • A file that mixes both forms keeps all its cues. A block whose timestamp is unreadable is counted and reported.
  • Cue numbers run from 1 in file order, so a skipped block leaves no hole in the numbering.
  • Files in another encoding than UTF-8 give a warning and can come out garbled, since the page decodes UTF-8 only.
  • The reverse direction is SRT to VTT, and Burn Subtitles into Video makes captions permanent.

VTT to SRT questions

Why does the page say no cues were found?

No block had a readable timestamp. The short WebVTT form 00:01.000 is read, and so are hours of one to three digits. If a file still fails, check that the arrow is written -->, that milliseconds have three digits, and that the file is WebVTT. The page then shows how many blocks it skipped.

What happens to styling tags?

Nothing; they are copied. A voice tag like v Roger, a class tag like c.yellow and inline timestamps all stay in the SRT text. Players that do not know them may print the tags.

Are cue settings kept?

No. Alignment, position and line settings after the timestamp are not copied, and neither are cue identifiers placed above it. SRT has no place for either.

What about NOTE, STYLE and REGION blocks?

They are skipped entirely, since SRT has no equivalent. A STYLE block's colors and any region layout are lost.

Does it fix timing or overlapping cues?

No. Timings are copied exactly, and overlapping cues stay as they are. The numbers are assigned in file order, from 1.

Is the file uploaded?

It is processed in your browser; this page does not upload it. The text is read and rewritten inside the page, and the tool's code makes no network request.

Does the SRT keep a byte order mark or Windows line breaks?

No. The download is UTF-8 without a byte order mark and uses LF line breaks only. A WebVTT file with CRLF line breaks and a byte order mark gave the same 531-byte SRT as the same file with LF and no mark.

What happens to &amp; and other character references?

They are copied as written, so the SRT line reads Tom &amp; Jerry &lt;3&nbsp;spaced, exactly as in the WebVTT file. If your player prints them, replace them with the plain characters in a text editor.

Why does my SRT have more cues than a browser shows for the WebVTT file?

The tool also reads timing lines that WebVTT does not allow, such as commas before the milliseconds or one-digit minutes. A test file with five timing lines gave 4 cues here, while Chrome 157, Firefox 155 and the WebKit build each read 2 from it.

How large a subtitle file can it convert?

A generated file with 5,000 cues (467,793 bytes) became a 397,785-byte SRT in a median of 9 ms in Chrome 157, 43 ms in Firefox 155 and 9 ms in the WebKit build, over 5 runs each.

Related Tools