SRT to WebVTT Converter

Convert SubRip .srt subtitle files to WebVTT .vtt for HTML5 video

Convert SubRip (.srt) subtitles to WebVTT (.vtt) for HTML5 video: rewrites comma millisecond separators to dots, adds the WEBVTT header, normalises timestamps and passes inline tags through. Pure browser conversion — no file upload. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What actually differs between SRT and WebVTT?

Structurally very little. WebVTT requires a WEBVTT header line at the top and uses a dot before the milliseconds (00:00:01.000) where SubRip uses a comma (00:00:01,000). The converter handles both changes and leaves the cue text intact.

WebVTT is the captioning format that HTML5 video understands through the <track> element, while SubRip (.srt) is the format most subtitle editors and download sites produce. The two are nearly identical, which is why converting between them is fast and lossless. This tool turns an .srt into a browser-ready .vtt.

How it works

The converter normalises line endings, strips a leading byte-order mark if present, and walks the file cue by cue. For each cue it:

  1. Reads the optional index — the bare number above the timestamps. WebVTT allows an identifier line, so this is kept.
  2. Rewrites the timing line. A SubRip timing line such as 00:00:01,000 --> 00:00:04,000 becomes 00:00:01.000 --> 00:00:04.000. The only change is the comma before the milliseconds turning into a dot. Timestamps with a single-digit hour are padded to two digits, and any SubRip positioning coordinates after the times — which WebVTT doesn’t accept in that form — are removed.
  3. Copies the text lines verbatim until the blank line that ends the cue.

Finally it prepends the mandatory WEBVTT header. Without that header browsers reject the track entirely.

Inline tags

Basic styling tags such as <i> (italic) and <b> (bold) are valid in both SubRip and WebVTT, so they pass straight through. If your captions rely on them, the formatting survives the conversion.

Conversion example

A SubRip cue:

1
00:00:01,000 --> 00:00:04,000
Welcome to the demo subtitle.

becomes, after the WEBVTT header:

WEBVTT

1
00:00:01.000 --> 00:00:04.000
Welcome to the demo subtitle.

You can then reference the file from an HTML5 video element:

<video controls>
  <source src="video.mp4" type="video/mp4">
  <track kind="subtitles" src="subtitles.vtt" srclang="en" label="English">
</video>

Why the WEBVTT header is mandatory

Browsers enforce the WEBVTT header strictly: even a single missing or misspelled character causes the entire subtitle track to be silently ignored. The browser’s network inspector will show the file loaded with a 200 status, but no captions will appear — which makes it one of the harder subtitle bugs to diagnose. Always check that the first line of any .vtt file you serve is exactly WEBVTT (optionally followed by a space and a file note, but never by a blank line before that first cue).

WebVTT features beyond SRT

Once you have a .vtt file, you can take advantage of WebVTT-specific features that SubRip does not support — provided your video player honours them:

  • Cue positioning. WebVTT allows precise positioning of caption text with align:, line:, position:, and size: settings on the timestamp line.
  • Cue identifiers. The numeric index carried over from SRT is a valid WebVTT cue identifier, useful for targeting individual cues with JavaScript.
  • Ruby tags. WebVTT supports <ruby> and <rt> for phonetic annotations, relevant for Japanese and Chinese captioning.
  • Voice spans. <v Speaker Name> tags let players visually distinguish who is speaking.

This converter carries over the cue index and basic inline tags. Advanced positioning should be added in a WebVTT editor after conversion.

Everything runs in your browser — your subtitles are never uploaded.