Subtitles & captions in depth

What Is a VTT File? The WebVTT Format Explained

A VTT file is a WebVTT subtitle file: plain text that lists timed lines of speech for a video or audio player to display. It was designed for the web, so browsers read it natively, and it adds features plain SRT lacks, such as positioning, styling hooks, comments and speaker voice tags. You can open and edit one in any text editor.

4 min read · Updated

What's inside a VTT file

Every WebVTT file starts with the word WEBVTT on the first line. After a blank line come cues, each made of:

  1. An optional identifier line, such as a number or a name.
  2. A timing line with a start and end time separated by an arrow, written with a full stop before the milliseconds: 00:01:05.200 --> 00:01:08.900. Hours can be left out for short files.
  3. One or more lines of text.
  4. A blank line before the next cue.

The file must be saved as UTF-8 text. That's it for a basic file; everything else is optional.

Features beyond SRT

Cue settings
After the timing, settings such as line, position, align and size place a cue higher on the screen or to one side, useful when text would cover a speaker's name graphic.
NOTE blocks
Comments for editors, ignored by players.
STYLE blocks
CSS rules inside the file that compatible players apply to cues.
Voice tags
Markup naming the speaker of a line, which some players and platforms display.
Inline tags
Bold, italic, underline and classes for styling parts of a line.

SRT has none of these formally, though many players accept simple bold and italic tags in it. SRT vs VTT compares the two in detail, and subtitle file formats places both among the other formats you'll meet.

Where VTT is required or preferred

  • Web pages. The HTML track element reads WebVTT, not SRT; adding subtitles to an HTML5 video shows the markup.
  • Streaming. HLS streaming uses WebVTT for subtitles.
  • Podcasts. Apple Podcasts accepts VTT and SRT transcripts and uses VTT voice tags to show speaker names; Apple Podcasts transcripts explains.
  • Many video platforms and course systems accept VTT as well as SRT.

When a platform accepts both, either works. When a site asks specifically for "captions in VTT", it usually means a browser will play them.

Example: a lecture on a university site

A lecturer's video goes into the university's web player, which only takes VTT. She downloads the VTT from the same run as the SRT she uploaded to YouTube, so both platforms get identical text and timings without converting anything.

Opening and editing a VTT

Any plain text editor opens a VTT: Notepad, TextEdit in plain-text mode, VS Code. Edit text lines freely; keep the timing lines, the WEBVTT header and blank lines intact. For timing changes across many cues, use a subtitle editor; free subtitle editors covers the options. To play a VTT next to a video on your computer, VLC loads it like an SRT.

Converting between VTT and SRT takes a few changes: the header, the decimal separator and numbering. Converting SRT to VTT shows both directions and what gets lost.

Getting VTT files with mydubly

Every run of the subtitle generator returns a VTT and an SRT with the same cues, plus timestamped and plain transcripts. Upload a video (it stays on your device; only the audio is sent) or an audio file, choose the spoken language or one of 21 languages for translated subtitles, and download. The VTT generator page covers the format-specific details.

Limits of VTT, and of automatic files

  • Not every editor, TV or older player reads VTT; SRT is more widely supported offline.
  • Styling inside a VTT is applied inconsistently across players, and some devices override it with the viewer's own caption settings.
  • Automatic VTT files are plain: one line per cue, no positioning, no voice tags and no sound descriptions. Add those yourself if a platform or audience needs them.
  • A file without the WEBVTT header, or with commas in timestamps, is an SRT renamed to .vtt and many players will reject it. SRT file not working covers similar errors.

VTT for languages and scripts

Because WebVTT must be UTF-8, it handles every script cleanly: Hindi in Devanagari, Arabic and Hebrew right to left, Japanese, Korean and Chinese. Encoding mix-ups that plague old SRT files, covered in subtitles showing strange characters, are rarer with VTT. Right-to-left text still needs care in players and editors that handle punctuation direction poorly; right-to-left video localization covers the quirks. For a translated VTT, label the track with the right language code so players list it correctly, and check line lengths, since some languages run longer than the original. Text expansion in translation explains why.

A tiny example, described

A two-cue VTT reads, line by line: WEBVTT, a blank line, the timing 00:00.000 --> 00:02.500, the text "Welcome back.", a blank line, the timing 00:02.500 --> 00:06.000, the text "Today we're looking at subtitles." That's a complete, valid file; every other feature is optional.

Frequently asked questions

What is a VTT file?

A WebVTT subtitle file: plain text with timed lines of speech that video and audio players display, designed for the web.

How do I open a VTT file?

In any plain text editor to read or edit it, or load it in VLC next to the video to watch with subtitles.

What's the difference between VTT and SRT?

VTT starts with a WEBVTT header, uses a full stop before milliseconds, and supports positioning, styling, comments and voice tags. SRT is simpler and more widely supported offline.

Can I convert VTT to SRT?

Yes. Remove the header, add numbers, change the full stops in timestamps to commas, and drop VTT-only features. A subtitle editor does it in one step.

Does YouTube accept VTT files?

Yes. YouTube Studio accepts VTT as well as SRT for subtitle uploads.

Why does my browser ignore my VTT file?

Check that it starts with WEBVTT, uses full stops in timestamps, is saved as UTF-8 and is served with the text/vtt content type.

What does VTT stand for?

Web Video Text Tracks. The format's full name is WebVTT, and files use the .vtt extension.