Subtitles for HTML5 video: a VTT file and one line of markup.

Browsers show captions natively when a video has a WebVTT track. Make the .vtt here from your video's speech, add a <track> element, and the player grows a CC button. No library needed.

WebVTT for <track>Every modern browser35 translation languagesFree preview

How it works

From your video to captions on your site in three steps.

1

Make the VTT

Upload the video or its audio, correct the transcript, and download .vtt.

2

Host it beside the video

Put the file on the same domain as the page, for example /media/intro.en.vtt.

3

Add the track element

Put a <track> inside the <video> tag pointing at the file. Markup below.

The markup

Copy, change the paths, done.

One language, on by default:

<video controls width="960" src="/media/intro.mp4">
  <track kind="captions" src="/media/intro.en.vtt" srclang="en" label="English" default>
</video>

Add languages by adding tracks. Use kind="captions" for the spoken language and kind="subtitles" for translations:

<track kind="subtitles" src="/media/intro.es.vtt" srclang="es" label="Español">

Style the text from your stylesheet with the ::cue selector, for example video::cue { font-size: 1.1em; background: rgba(0,0,0,.75); }. The file made here holds the timed text only, so appearance is entirely your CSS. Player libraries such as Video.js and Plyr read the same <track> elements.

When captions do not show

Five causes cover nearly every case.

  1. The file is SRT. The track element accepts WebVTT only. An SRT is ignored without an error. Download .vtt or use SRT to VTT.
  2. Cross-origin. A VTT on another domain or a CDN needs an Access-Control-Allow-Origin header, and the video tag needs the crossorigin attribute.
  3. Opened from disk. Tracks are blocked on file:// pages. Use a local web server to test.
  4. No default. Without it the track exists but is off until the viewer picks it from the CC menu.
  5. A broken first line. The file must begin with WEBVTT. If you edited it in a word processor, save as plain UTF-8 text.

What a VTT file contains, line by line: the VTT file format.

Sample output

What the VTT file looks like.

WEBVTT

00:00:34.680 --> 00:00:46.500
fourscore and seven years ago our fathers brought forth upon this continent a new nation conceived in in liberty, and dedicated to the proposition

00:00:46.500 --> 00:00:50.300
that all men are created equal.

00:00:50.300 --> 00:00:57.500
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived

00:00:57.500 --> 00:01:01.620
and so dedicated, can long endure.

00:01:01.620 --> 00:01:07.920
We are met on a great battlefield of that war we have come to dedicate a portion of that field

00:01:07.920 --> 00:01:14.240
as a final resting place for those who here gave their lives that their nation might live

00:01:15.360 --> 00:01:18.800
it is altogether fitting and proper that we should do this

Real output, unedited: a public-domain LibriVox reading of the Gettysburg Address (2 min 41 s) transcribed here in October 2026. The repeated word and the missing capitals are what came back; you would fix those on the transcript before downloading.

Before you rely on it

What the subtitle file is, and what it is not.

One cue per spoken phrase

Each cue is a phrase from the transcript with its start and end time. Most run a few seconds. A passage spoken without a pause can come out as one long cue of up to about half a minute, so split those in your editor if your platform wants two short lines at a time.

Timing comes from the audio

Cue times are taken from the recording itself, so the file lines up with the video or audio you uploaded. If you trim the start of the video afterwards, shift the cues by the same amount in your editor.

Accuracy we measured

On public test recordings, about 7 words in 100 differed from the reference for clean English read speech, between 4 and 9 in 100 for Spanish, Portuguese, Russian, French and German, and about 21 in 100 for Hindi. Noisy rooms, music and crosstalk do worse. Method and every number: the benchmark.

Fix a line before you download

Open the transcript, correct a misheard name or number on its line, and the SRT and VTT you download carry the correction with the timing unchanged.

A plain file, not a styled video

You get the subtitle file. Fonts, colours, position and captions drawn into the picture are done in your video editor or player, which reads this file.

Limits

Up to 10 hours or 5 GB per recording. The box on this page takes files up to 500 MB; larger ones continue on the upload page. 99+ languages, detected automatically.

Pricing

What a VTT for your site's video costs

The preview is free. When the full transcript needs a pack, one-time packs are $4 for 500 minutes, $8 for 1,000 minutes, $12 for 2,000 minutes, $24 for 5,000 minutes. Credits never expire, which comes to about $0.29 to $0.48 per hour of audio.

Recording$4 or $8 pack$12 pack$24 pack
90-second homepage video$0.02$0.01$0.01
10-minute product demo$0.08$0.06$0.05
40 help videos of 5 minutes$1.60$1.20$0.96

Figures are the share of a pack each recording uses. A button opens secure checkout for that pack. Every export format is included; full details on the pricing page.

FAQ

Subtitles for HTML5 video, answered.

How do I add subtitles to an HTML5 video?

Create a WebVTT file for the video, host it on the same domain, and add a track element inside the video tag with kind, src, srclang and label attributes.

Can I use an SRT file with the HTML track element?

No. Browsers accept only WebVTT in the track element. Convert the SRT to VTT, or download the VTT version here.

How do I style HTML5 captions?

With the ::cue selector in CSS. You can set font, size, colour and background. The VTT made here contains timed text only, so the look comes from your stylesheet.

How do I offer subtitles in several languages?

Add one track element per language, each pointing to its own VTT file with its own srclang and label. Mark one as default.

Do I need a JavaScript player for captions?

No. Chrome, Safari, Firefox and Edge all render WebVTT tracks in the native video element.

Subtitles and captions

Every page in this set uses the same upload box and the same export. All subtitle pages

Closest to this page

For a platform or an editor

Make subtitles

From a link or a file

WebVTT

Convert a subtitle file

Formats and rules

By language

Make the VTT. Add one line of markup.

Free preview. VTT and SRT from the same upload; packs from $4.