Convert SRT to VTT programmatically with one HTTP request. The SRT to VTT API takes your .srt file and returns WebVTT (.vtt) — the native caption format of the HTML5 <video> element and the format most streaming platforms ingest.
SRT and WebVTT share the same cue structure, so timing and text carry over; the API adds the WEBVTT header and converts the timestamp syntax. One credit per conversion, 100 free credits on your first key.
Why convert SRT to VTT with an API
- Automate: run conversions in CI/CD, ingestion pipelines, or cron jobs.
- Batch: process whole libraries of
.srtfiles without a desktop app. - Integrate: drop conversion into a video platform or captioning workflow.
Convert with cURL
curl -X POST https://api.example.com/api/v1/convert \
-H "Authorization: Bearer your_api_key" \
-F "[email protected]" \
-F "from=srt" \
-F "to=vtt" \
-o movie.vtt
Compact example — Python
import os, requests
resp = requests.post(
"https://api.example.com/api/v1/convert",
headers={"Authorization": f"Bearer {os.environ['SUBTOVTT_API_KEY']}"},
files={"file": ("movie.srt", open("movie.srt", "rb"), "application/x-subrip")},
data={"from": "srt", "to": "vtt"},
)
resp.raise_for_status()
print("Cues:", resp.headers.get("X-Cue-Count"))
open("movie.vtt", "wb").write(resp.content)
Full examples by language
- Convert SRT to VTT with Python
- Convert SRT to VTT with Node.js
- Convert SRT to VTT with cURL
- Convert SRT to VTT with PHP
- Convert SRT to VTT in the browser
Format notes
| Topic | Detail |
|---|---|
| Output | WebVTT (.vtt), UTF-8 |
| Header | Adds the WEBVTT declaration line |
| Timestamps | Same timing; 00:00:01,000 → 00:00:01.000 |
| Styling | Cue settings like align: and position: supported |
| Usage | HTML5 video, most streaming platforms |
Note: SRT is plain text with one cue per block, so nothing is lost moving to WebVTT.
FAQ
How much does SRT to VTT conversion cost? One credit per conversion. Keys start with 100 free credits; top-ups are $2/1k, $9/10k, or $40/50k.
Can I adjust timing in the same request? Yes — pass shift_ms to shift timestamps, or use the two-point resync params (two_point_t1, t1p, t2, t2p) for non-linear drift.
Next
- Convert VTT to SRT →
- Convert SRT to TXT →
- Try the free SRT→VTT converter — no signup required
- Get credits →