CueConvertBrowser-only tool

WebVTT file.

A WebVTT file is a plain-text file that starts with WEBVTT, then holds blank-line-separated blocks: optional NOTE and STYLE blocks, and cue blocks with a start --> end timing line, optional cue settings and caption text. Its conventional extension is .vtt and its MIME type is text/vtt.

Below you can inspect and convert a WebVTT file in your browser, download a complete real .vtt sample, and check the measured input-to-output results and failure cases we ran through this page's own parser. Nothing is uploaded.

Download the sample .vtt file 671 bytes · UTF-8 · 4 cues · save it, then choose it above to reproduce the numbers on this page.

The file is read with the File API. A UTF-8 BOM and CRLF line endings are normalised; a byte sequence that is not valid UTF-8 is decoded as Windows-1252 and reported. The SRT download is always UTF-8.

Choose a .vtt file to begin.

Output preview

No conversion yet.

What is inside a WebVTT file

A .vtt file has one header line beginning with WEBVTT, optionally followed by a space and a title, and by header metadata lines such as Kind: captions and Language: en. After a blank line, each block is one of four kinds: a NOTE comment block, a STYLE block holding CSS for cues, or a cue block. A cue block may start with a cue identifier on its own line, then a timing line, then one or more lines of caption text. Blocks are separated by blank lines; a missing blank line merges the next timing line into the previous cue's text, which is exactly what the missing-blank-line.vtt fixture below measures.

Timestamps are mm:ss.mmm or hh:mm:ss.mmm with a period before the milliseconds, and the arrow must have whitespace on both sides. After the end timestamp come optional cue settings such as line:0, position:10%, size:80% and align:start. Caption text may carry inline tags: a voice span <v Narrator>…</v>, emphasis <i> and <b>, class spans such as <c.yellow>, and in-cue timestamp tags such as <00:00:07.250>. In an HTML page the file is attached with <track kind="captions" src="captions.vtt" srclang="en"> and served as text/vtt.

How this page differs from our other VTT pages. VTT file format is the hand-writing reference: it walks through the field table, four broken inputs and a downloadable CSV. VTT to SRT is the conversion tool alone. This page is about the file as a whole: a complete downloadable sample, a block-level inspector, and measured parser results including encoding and block-merging cases. If you are writing timestamp lines by hand, start with the format reference; if you want a file to open, edit or attach to a video, start here.

Measured results from our own sample files

Every number below was read back from a real browser run of the converter above using the self-authored fixtures linked further down. These are observations from this page's parser, not estimates, rankings or traffic figures.

MeasurementObserved value
Sample filesample-webvtt.vtt — 671 bytes, UTF-8, LF line endings, no BOM, split into 7 blank-line blocks
Block classification1 WEBVTT header with Kind: captions and Language: en, 1 NOTE block, 1 STYLE block, 4 cue blocks
Structure counted in the sample3 cue identifiers, 8 cue settings (line, position, size, align), 9 inline tags, 1 text entity
Cues accepted4 cues, 0 warnings; first 00:00:00.500 --> 00:00:02.800, last 00:00:09.500 --> 00:00:12.000
Downloaded SRT295 bytes, valid UTF-8, 4 cues; first 00:00:00,500 --> 00:00:02,800, last 00:00:09,500 --> 00:00:12,000; text, cue count and timecodes matched the on-page preview exactly
Inline markup removed<v Narrator>Welcome to the WebVTT sample file.</v> became Welcome to the WebVTT sample file.; &amp; decoded to &
BOM and CRLF casebom-and-crlf.vtt, 166 bytes: UTF-8 BOM stripped, CRLF normalised, 2 cues, 133-byte SRT, <b>tag</b> stripped and &amp; decoded
Legacy single-byte caselegacy-latin1.vtt, 57 bytes: strict UTF-8 decoding failed, fell back to Windows-1252, produced 1 cue and a 58-byte UTF-8 SRT containing “Café” — first cue
Missing headerno-header.vtt, 62 bytes → 0 cues, 1 warning: This file must start with a WEBVTT header.
Invalid timing linescomma-milliseconds.vtt (89 bytes) and arrow-without-spaces.vtt (77 bytes) → each 0 cues and 1 warning; the cue block was skipped
Impossible or empty cuesreversed-times.vtt (75 bytes) and empty-payload.vtt (38 bytes) → each 0 cues and 1 warning, with no invented end time or caption text
Missing blank linemissing-blank-line.vtt, 101 bytes → 1 merged cue, 1 warning, 95-byte SRT; the second timing line was kept as caption text rather than silently dropped
390 px viewportclientWidth 390 = scrollWidth 390, no horizontal overflow; file input, Convert button and the sample download link all sit inside the first 844 px viewport; the diagram loads
Diagram mapping the 671-byte sample WebVTT file's header, NOTE/STYLE blocks and first cue block to the 295-byte downloaded SRT with comma timecodes and stripped inline tags
Original diagram built from the measured sample file and the downloaded SRT, not from a borrowed visual.

Download the sample and reproduce these numbers

All nine fixtures are self-authored. Start with sample-webvtt.vtt — a complete, valid WebVTT file you can open in an editor, attach to a <track> element, or feed straight into the converter above. The other eight are deliberately broken or unusual files used for the failure boundaries.

Direct answers

Is my WebVTT file uploaded anywhere?

No. The file is read with the browser's File API, parsed in JavaScript and written to a Blob; the SRT download uses a local object URL. There is no fetch, no back end and no account. This page sets a Content-Security-Policy that permits only its own scripts, stylesheet and images.

Why did one of my cues disappear?

Four cases are intentional and each produces a visible warning in the tool: a file without a WEBVTT header, a timing line with comma milliseconds or no spaces around the arrow, an end time that is not later than the start, and a cue with no caption text. A fifth case, two cues with no blank line between them, merges them into one cue and keeps the second timing line as text — the warning says so explicitly. Open the corresponding fixture above to see the exact message.

What happens to cue settings, voice tags and STYLE blocks in the SRT?

They are not written. SRT has a cue number, comma-millisecond timestamps and plain text, so line:0, position:10%, <v Narrator>, <i>, <c.yellow>, in-cue timestamp tags and STYLE blocks cannot be represented. The inspector counts them before conversion, and the cue table shows the plain text that will be written. If styling or positioning matters, keep the .vtt file rather than exporting to SRT.

Can I use the downloaded sample with an HTML video?

Yes, as a text track: serve the .vtt file as text/vtt and add <track kind="captions" src="sample-webvtt.vtt" srclang="en" label="English"> inside your <video> element. The sample's first cue runs from 0.500 to 2.800 seconds, so it is visible almost immediately. This page does not play video or check player support.

Does a WebVTT file need a byte order mark?

No. A UTF-8 BOM is optional: bom-and-crlf.vtt was read to the same 2 cues after the BOM was stripped and CRLF was normalised, with no warning. What matters is that the bytes decode as UTF-8 and the first line starts with WEBVTT.

Failure boundaries