How to convert SRT to VTT for HTML5 video
TL;DR — Convert SRT to VTT for HTML5 video. Add the WEBVTT header, change timestamp commas to dots, and make browser-ready captions with no upload.
Related tool
SRT to VTT Converter
If your subtitles started as SRT and the destination is an HTML5 video player, WebVTT (VTT) is usually the correct final format. SRT is great for editing and exchange, but VTT is the web-native caption format that browsers expect.
Quick answer
Use SRT while collecting or exchanging subtitle files, then convert the final delivery file to VTT before browser playback. Use the SRT to VTT Converter to add the WEBVTT header, switch timestamp commas to dots, and create a browser-ready caption file locally with no upload.
Pick the right SRT to VTT path
| Situation | Best next step | Tool or guide | Why |
|---|---|---|---|
| You have a clean SRT file for a website | Convert to VTT | SRT to VTT Converter | HTML5 <track> captions expect WebVTT, not SubRip cue blocks |
| You are not sure the SRT file is valid | Validate before converting | SRT Validator | Broken cue numbers, malformed timestamps, or missing blank lines can create missing VTT cues |
| The VTT file still will not load | Validate delivery and player setup | WebVTT Validator | Browser playback can fail because of missing headers, invalid timestamps, MIME type, CORS, or track URLs |
| A client needs SRT again | Convert VTT back to SRT | VTT to SRT Converter | SRT is still useful for editors, reviews, uploads, and legacy handoffs |
| You only need readable text | Convert SRT to TXT instead | SRT to TXT Converter | Plain text removes cue timing, so it is for notes or transcripts, not browser captions |
Why HTML5 video usually wants VTT
Most browser-based players expect WebVTT because it’s the web-native caption format. That includes:
- Plain HTML5
<track>playback: The native browser video element - Custom video components: React, Vue, Angular video players
- JavaScript player libraries: Video.js, Plyr, MediaElement.js, JW Player
SRT may still work in some workflows, but VTT is the safer default when captions are meant to render inside a browser. For a detailed comparison, see SRT vs VTT. If you are choosing the final format for a website, use best subtitle format for HTML5 video.
What changes during conversion
The conversion mainly does three things:
- Adds the
WEBVTTheader: The first line of the file becomesWEBVTT(required by the spec) - Switches timestamp commas to dots:
00:00:01,000→00:00:01.000 - Removes SRT cue numbering: Cue numbers (
1,2,3) are optional in VTT and usually removed
Before (SRT):
1
00:00:01,000 --> 00:00:03,500
Welcome to the tutorial.
2
00:00:03,500 --> 00:00:06,000
In this video, we'll cover the basics.
3
00:00:06,000 --> 00:00:09,000
Let's get started.
After (VTT):
WEBVTT
00:00:01.000 --> 00:00:03.500
Welcome to the tutorial.
00:00:03.500 --> 00:00:06.000
In this video, we'll cover the basics.
00:00:06.000 --> 00:00:09.000
Let's get started.
What stays the same: The subtitle text, timing, and line breaks within each cue.
Step-by-step workflow
1. Start with a clean SRT file
Before converting, make sure the SRT file is well-formed. Malformed files may produce incomplete or garbled VTT output.
Optional but recommended: Validate the SRT file first:
- Open the SRT Validator
- Upload your
.srtfile - Fix any reported errors (missing timestamps, wrong format, etc.)
- Re-validate until the report is clean. See how to validate SRT files for a detailed walkthrough.
2. Convert SRT to VTT
- Open the SRT to VTT Converter
- Upload the
.srtfile or paste its contents into the text area - Click Convert to VTT
- The tool automatically:
- Adds the
WEBVTTheader - Converts timestamp commas to dots
- Removes cue numbers (optional, configurable in some converters)
- Preserves subtitle text and timing
- Adds the
3. Review the output
Check the converted VTT file:
- Header: First line is
WEBVTT(uppercase) - Timestamps: Use dots (
00:00:01.000), not commas - Text: Subtitle text is intact and readable
- Encoding: Non-English characters display correctly
If anything looks wrong, validate the output with the WebVTT Validator before adding the file to a player.
4. Download the VTT file
Click Download VTT to save the converted file. The file is ready to use in HTML5 video players.
5. Test in the target player
Before shipping, test the VTT file in the actual player environment:
<video controls>
<source src="video.mp4" type="video/mp4" />
<track kind="subtitles" src="captions.en.vtt" srclang="en" label="English" default />
</video>
Open the page in a browser and verify:
- Captions appear at the correct times
- Text is readable and properly formatted
- No timing drift or sync issues
Common mistakes
Uploading SRT directly into a browser workflow
Some players or components are strict about VTT formatting. If captions don’t render, wrong file format is one of the first things to check.
Fix: Always convert SRT to VTT before using it in HTML5 video players.
Renaming SRT to VTT without converting
Changing .srt to .vtt does not convert the file. The browser sees SRT-style timestamps (commas) and no WEBVTT header, so it rejects the file.
Fix: Use the SRT to VTT Converter to properly convert the file.
Forgetting the header
VTT files need a WEBVTT header. A file that looks close to VTT but lacks that first line can still fail.
Fix: Use the converter to ensure the header is added correctly.
Keeping commas in timestamps
SRT uses commas in timestamps (00:00:01,000). VTT uses dots (00:00:01.000). If those timestamps are not normalized, browser playback can reject the file.
Fix: The converter automatically replaces commas with dots.
Ignoring encoding issues
If names, accents, or non-English captions look wrong after conversion, fix the text encoding before using the VTT file.
Fix: Re-save the SRT file as UTF-8 in a text editor before converting, or use the Subtitle Encoding Fixer after conversion.
Not testing in the target player
A VTT file that looks correct in a text editor can still fail in the player due to:
- Wrong MIME type from the server (
text/plaininstead oftext/vtt) - CORS issues (cross-origin requests blocked)
- Malformed cues that the validator missed
Fix: Always test the VTT file in the real playback environment (HTML5 video in a browser).
When not to convert
Keep the original SRT if:
- A client specifically asked for SRT: Some workflows require SRT for compatibility with legacy systems
- You’re archiving a delivery file that already works: No need to convert if the current format is sufficient
- The next tool in the workflow only supports SRT: Some subtitle editors or video platforms prefer SRT
In that case, treat VTT as the playback export rather than the only master file. Keep both SRT (for editing) and VTT (for browser playback).
If the next step doesn’t need subtitle timing at all, use the SRT to TXT Converter instead. That keeps the readable subtitle text and removes cue numbers plus timestamp lines.
Troubleshooting scenarios
Scenario 1: VTT file doesn’t load in HTML5 video
Possible causes:
- VTT file is malformed (missing
WEBVTTheader, wrong timestamp format) - Server sends wrong MIME type (
text/plaininstead oftext/vtt) - CORS headers missing (cross-origin request blocked)
- Track element has wrong
srcURL (404 error)
Fix:
- Validate the VTT file with the WebVTT Validator
- Check the browser console for errors (F12 → Console tab)
- Check the Network tab for the VTT request - verify it returns 200 OK and
Content-Type: text/vtt - If cross-origin, verify CORS headers and
crossorigin="anonymous"attribute
For MIME type issues, see how to fix VTT MIME type for HTML5 video. For a broader troubleshooting walkthrough, see How to fix invalid WebVTT timestamps.
For a full browser playback checklist, use why subtitles do not show in HTML5 video.
Scenario 2: Captions appear but text is garbled
Cause: Wrong text encoding (e.g., Windows-1252 instead of UTF-8).
Fix: Re-save the SRT file as UTF-8 before converting, or use the Subtitle Encoding Fixer after conversion.
Scenario 3: Timestamps are off by a few milliseconds
Cause: Rounding errors during comma-to-dot conversion, or the original SRT file had precision issues.
Fix: Use the Subtitle Time Shifter to adjust timing if needed.
Scenario 4: Some cues are missing from the VTT output
Cause: The SRT file has malformed cues (missing timestamps, wrong cue number sequence) that the converter skipped.
Fix: Validate the SRT file with the SRT Validator before converting. Fix any errors, then re-convert.
Scenario 5: VTT file works in Chrome but not Firefox or Safari
Cause: Firefox and Safari are stricter about MIME types and CORS than Chrome.
Fix:
- Confirm
Content-Type: text/vtt(nottext/plain) - If cross-origin, ensure
Access-Control-Allow-Originis set - Check the browser console for specific error messages
Frequently asked questions
How do I convert SRT to VTT for HTML5 video?
Use an SRT to VTT Converter to add the WEBVTT header, change comma timestamps to dot timestamps, remove SRT cue numbers, and save a .vtt file. Then test the file in the actual HTML5 <track> element or browser player.
Can I convert VTT back to SRT?
Yes. Use the VTT to SRT Converter to convert VTT back to SRT. This is useful if you need to send captions to a client or platform that expects SRT.
What’s the difference between SRT and VTT?
| Difference | SRT | VTT |
|---|---|---|
| Header | None | WEBVTT required |
| Timestamps | 00:00:01,000 (comma) | 00:00:01.000 (dot) |
| Cue numbers | Required | Optional |
| Browser support | ❌ Not native | ✅ Native |
| Styling | Limited HTML tags | CSS-like cue settings |
Will the conversion preserve formatting tags?
Yes. Basic HTML-like tags (<i>, <b>, <u>) are preserved during conversion. Advanced SRT tags (colors, fonts) may not be supported in VTT.
Can I convert multiple SRT files at once?
The SRT to VTT Converter processes one file at a time. For batch conversion, convert each file individually or use a command-line tool.
Does the converter handle multi-language SRT files?
Yes. The converter works with any UTF-8 encoded SRT file, regardless of language. Make sure the source file uses UTF-8 encoding to avoid character corruption.
What if my SRT file has speaker labels?
Speaker labels in the subtitle text (e.g., [John]: Hello) are preserved during conversion. If you want to remove them, edit the SRT file before converting.
Can I add cue settings during conversion?
Most converters don’t add cue settings automatically. After conversion, you can manually add cue settings (alignment, position, size) to the VTT file if needed.
What’s the best way to serve VTT files?
- MIME type: Configure your server to send
Content-Type: text/vttfor.vttfiles - CORS: If the VTT file is on a different domain, send
Access-Control-Allow-Originheaders - Encoding: Always use UTF-8 encoding
See How to fix VTT MIME type for HTML5 video for server-specific instructions.
Related guides
- Best subtitle format for HTML5 video
- SRT vs VTT
- How to convert subtitle files for web players
- How to fix VTT MIME type for HTML5 video
- How to validate WebVTT files
- How to convert subtitles for HTML5 video
Related tools
Use the SRT to VTT Converter
Convert SRT subtitles to WebVTT online for HTML5 video, browser players, and track elements. No signup, no upload, and everything runs locally in the browser.
Open SRT to VTT