How to Convert SRT to VTT Without Breaking Timestamps
SRT (SubRip) and VTT (WebVTT) are the two most common subtitle formats, but they differ in header requirements, timestamp separators, and styling capabilities. Converting between them seems trivial until timestamps break because of a comma-to-dot swap or a missing WEBVTT header. This guide covers the exact steps to convert cleanly.
By CapsAI · Updated 19 August 2026
Key takeaways
- The only required changes are adding the WEBVTT header and replacing comma with dot in timestamps.
- VTT supports inline styling and positioning that SRT does not - but these are optional.
- Never remove the blank line between subtitle blocks during conversion.
- Always validate the converted file by loading it in a browser video player before publishing.
Understanding the format differences
An SRT file starts directly with subtitle number 1. A VTT file must begin with the text WEBVTT on the first line, optionally followed by metadata. SRT uses commas as the millisecond separator (00:01:23,456) while VTT uses dots (00:01:23.456). SRT uses the arrow --> between start and end times, and VTT uses the same arrow but allows optional positioning data after it.
Both formats use blank lines to separate subtitle blocks and support basic line breaks within a block. SRT does not officially support HTML tags or CSS styling, though some players render basic bold and italic tags. VTT officially supports cue settings for position, alignment, and size, plus CSS-like styling blocks.
- SRT: No header. Timestamps use commas (00:00:01,500).
- VTT: Requires WEBVTT header. Timestamps use dots (00:00:01.500).
- SRT: Numbered sequence IDs are required.
- VTT: Cue identifiers are optional.
- VTT: Supports position, line, align, and size settings per cue.
Manual conversion steps
Open your SRT file in any plain text editor. Add WEBVTT as the very first line, followed by one blank line. Then find and replace all commas in timestamps with dots. The comma only appears in the timestamp lines (pattern: digits, comma, three digits), so a careful find-and-replace will not damage your subtitle text.
Optionally remove the numeric sequence identifiers (1, 2, 3...) at the start of each block. VTT does not require them. However, keeping them does not break anything - VTT treats them as optional cue identifiers. Save the file with a .vtt extension and UTF-8 encoding.
Start with 3 free minutes
Put Accurate Captions Into Practice
Create editable subtitles with CapsAI, then review Indian names, brands and places using the workflow in this guide.
Common mistakes that break timestamps
The most frequent error is replacing ALL commas in the file, including commas inside subtitle text. If your Hindi or English caption contains a comma ('Hello, world'), a global find-and-replace damages the text. Use a regex pattern that targets only timestamp lines: replace the pattern (\d),(\d{3}) with $1.$2 to limit changes to the millisecond separator.
Another common issue is saving without the blank line between blocks. Both SRT and VTT require an empty line between each subtitle entry. Some text editors strip trailing whitespace or blank lines on save. Verify the structure after saving. A missing blank line causes the next timestamp to be read as subtitle text.
Validating your converted VTT file
The simplest validation is to create a basic HTML file with a video element and a track element pointing to your VTT file. Open it in Chrome or Firefox and confirm that captions appear at the correct times. Browser developer tools will report VTT parsing errors in the console.
For Indian language content in Devanagari, Tamil, or other scripts, verify that the VTT file is saved as UTF-8 without BOM. Some Windows text editors add a BOM (byte order mark) that can cause the WEBVTT header to not be recognized. If captions fail to load, check the first few bytes of the file with a hex editor or simply re-save from VS Code with UTF-8 encoding selected.
Frequently asked questions
Can I just rename .srt to .vtt and it will work?
No. Renaming the extension does not add the required WEBVTT header or fix the comma-to-dot timestamp difference. The file will fail to parse in any standards-compliant player.
Do I need to remove the numeric IDs when converting to VTT?
No, they are optional in VTT. Keeping them is fine and makes it easier to convert back to SRT later if needed.
Will my Hindi text be affected by the conversion?
Not if you perform the conversion correctly. Only timestamp commas should change. Use a targeted regex replacement to avoid modifying commas within your Devanagari or English subtitle text.
Start with 3 free minutes
Create Your Next Subtitle with CapsAI
Upload a video and generate editable AI subtitles with 3 free minutes to get started.