OnlineTextLab
Esc

SRT to WebVTT Converter

Turns an SRT file into a WebVTT file a browser will load, with no change to any time and fixes for what VTT handles differently.

or paste the text here

Runs on your device. Your files and text are not uploaded.

About SRT to VTT

You have an SRT file, and your video is going on a web page. Browsers will not load SRT through the <track> element, so you need WebVTT. The formats look so alike that it is tempting to change the commas to dots and add a header line, and that often seems to work, right up until a cue contains an ampersand, a font tag or a positioning code.

This converter handles those differences as well as the obvious ones. Every time keeps its exact value, so captions stay in sync with your video. Overlapping cues stay overlapped, because that can be deliberate, but you are told about them.

Your file is named after the original, so film.srt downloads as film.vtt.

How it works

Times are converted as whole milliseconds rather than edited as text, and always written in full. 00:00:01,500 becomes 00:00:01.500, and a sloppy 0:00:01,5 is corrected to 00:00:01.500 as well. The cue numbers are dropped, since they are optional in WebVTT and a WEBVTT line opens the file.

<b>, <i> and <u> carry over, while <font> tags are removed because WebVTT does not support them. A bare & becomes &amp; and a stray < becomes &lt;, which the format requires. The position code {\an8} is translated to the cue setting line:0, and the other {\an} codes to their nearest match. Blank lines inside a cue are removed, since a blank line would end the cue early in WebVTT.

How to use SRT to VTT

  1. Click Select SRT file, or paste the subtitles into the box.
  2. Read any warning under the result, such as one for overlapping or reversed times.
  3. Look over the output on the right. It is ready to use as it stands.
  4. Click Download VTT, and reference the file from your video's <track> element.

A font tag, an ampersand and a position code

Input
1
00:00:01,000 --> 00:00:03,500
<font color="#ffff00">Welcome to R&D.</font>

2
00:00:03,750 --> 00:00:06,000
<i>Please</i> keep your badge visible.

3
00:00:05,500 --> 00:00:08,000
{\an8}Visitors sign in at the front desk.
Output
WEBVTT

00:00:01.000 --> 00:00:03.500
Welcome to R&amp;D.

00:00:03.750 --> 00:00:06.000
<i>Please</i> keep your badge visible.

00:00:05.500 --> 00:00:08.000 line:0
Visitors sign in at the front desk.

Cues 2 and 3 overlap by half a second. Their times are kept exactly, and a warning appears under the result. The color was lost when the font tag was removed; if you need it back, use a ::cue rule in your site's CSS.

When it helps

  • Adding existing captions to a video on your own website.
  • Moving a course from a desktop player to a web-based learning platform.
  • Preparing subtitles from an editing program, most of which export SRT, for an HTML5 player.
  • Fixing captions that look fine in a media player but show odd characters on the web.

Tips for a better result

  • After uploading, check the Content-Type for the file. A server should send text/vtt, and a wrong type is a common reason for captions not appearing.
  • Colored text needs more work in VTT. Wrap it in a class such as <c.yellow> and write a matching ::cue(.yellow) rule in your stylesheet.
  • If you see the warning for reversed times, go back to the source. Players may skip a cue whose end comes before its start, and it was probably a typing error.

Good to know

  • It does not fix timing. To shift or stretch subtitles, you will need a subtitle editor.
  • {\an} codes are matched approximately, since the two formats position text differently, and other SSA style codes are removed.
  • Cue numbers are not kept as cue identifiers, which matters only if your player script looks up cues by number.
  • It converts SRT only, not ASS, SUB or other subtitle formats.

Questions people ask

Is it enough to replace commas with dots and add WEBVTT at the top?

For very simple files, yes. It goes wrong when a cue has an unescaped &, a < character, font tags or position codes, since those are read as markup in WebVTT and can make text vanish or display oddly.

Will any of my subtitle times change?

No, apart from the punctuation and padding. Each value keeps its exact millisecond, and converting back with VTT to SRT gives the same times again.

What if I paste a file that is already VTT?

You get an error telling you it already starts with WEBVTT and pointing to VTT to SRT, so you do not end up with a broken double conversion.

My SRT uses dots in the times instead of commas. Is that a problem?

It is not. Strictly an SRT should use commas, but files with dots turn up in practice and are accepted here. The output is always correct WebVTT.

What to use next

  • VTT to SRT: for the same conversion going the other way
  • SRT to TXT: if what you actually need is the words rather than timed captions
  • Transcript to VTT: if you are starting from a transcript and not a subtitle file

Learn more

Last reviewed . Read our editorial policy.