Txtloom

SRT to VTT converter free WebVTT for HTML5 video, batch, no upload

Turn SRT files into WebVTT for a web video player. Times, line breaks and bold, italic or underline are kept; the WEBVTT header, timestamps and escaping are fixed, and you get the <track> line to paste into your page.

SRT

Paste or open .srt files

WebVTT

Waiting for input
    HTML for your video player
    <track kind="subtitles" src="example.vtt" srclang="en" label="English">

    Converted in this browser tab; files are not uploaded.

    How do I convert SRT to VTT?

    Add a WEBVTT line at the top, change the comma before the milliseconds to a full stop, and escape any bare & or < in the text. Those are the changes the W3C WebVTT format requires; cue numbers can go, because WebVTT cue identifiers are optional. The converter does all of it and reports problems it finds.

    1. Paste the SRT, or open or drop one or more .srt files.
    2. If a file is not UTF-8, choose its encoding under “Read as”.
    3. Shift all times if the subtitles run early or late.
    4. Download the .vtt (or a ZIP for several files) and copy the <track> line for your page.

    Example: before and after

    SRT input
    1
    00:00:01,000 --> 00:00:03,500
    Welcome back to Field Notes,
    the show about small projects.
    
    2
    00:00:03,500 --> 00:00:07,900
    <i>Today</i> I’m talking with Maya & friends.
    
    3
    00:00:08,200 --> 00:00:10,000
    {\an8}<font color="#ffff00">[Birdsong]</font>
    WebVTT output
    WEBVTT
    
    00:00:01.000 --> 00:00:03.500
    Welcome back to Field Notes,
    the show about small projects.
    
    00:00:03.500 --> 00:00:07.900
    <i>Today</i> I’m talking with Maya &amp; friends.
    
    00:00:08.200 --> 00:00:10.000
    [Birdsong]

    The cue numbers are left out, “&” is escaped, and the {\an8} code and <font> tag are dropped; <i> is kept.

    What the converter changes

    In the inputResultDetails
    First lineAddedWEBVTT, then a blank line.
    TimestampsChanged00:00:01,000 becomes 00:00:01.000. Hours are always written.
    Cue numbersRemovedWebVTT cue identifiers are optional.
    Line breaks inside a subtitleKept
    <b>, <i>, <u>KeptThey exist in both formats.
    <font> tagsRemovedThe text inside them is kept. WebVTT uses class spans such as <c.yellow> instead.
    {\an8} and other {\…} codesRemovedWebVTT places cues with cue settings, which are not added.
    A bare & or <EscapedWritten as &amp; and &lt;; existing entities such as &amp; are left alone.
    “-->” inside the textEscapedWritten as --&gt;, because a cue may not contain “-->”.
    Text after the end timeRemovedSuch as the X1:… Y1:… coordinates some SRT tools write.
    Byte order mark, Windows line endingsRemovedThe VTT is written as UTF-8 with plain line breaks.

    The check under the result counts the subtitles and lists damaged blocks, missing blank lines, overlapping subtitles and subtitles that end before they start.

    Common problems and fixes

    The player shows no subtitles at all
    Check the file starts with WEBVTT; the specification requires it. Then check the <track> element: MDN notes that srclang is required when kind="subtitles", and the file must come from the same origin as the page unless the video element has a crossorigin attribute.
    A comma before the milliseconds
    SRT writes 00:00:01,000; WebVTT timestamps use a full stop. A file renamed from .srt to .vtt keeps the comma and is not valid WebVTT. The converter rewrites every timestamp.
    Text disappears after an & or <
    WebVTT cue text may not contain a bare & or <. “Q&A” and “1 < 2” are escaped for you; tags the format knows, such as <i>, stay tags.
    {\an8} codes or <font> colours
    These SubRip extras have no WebVTT form and are dropped. To move a subtitle to the top in WebVTT, add a cue setting such as line by hand after converting.
    Overlapping subtitles
    WebVTT lets cues overlap, but a cue may not start earlier than the cues before it, and its end must be after its start. Overlaps usually come from timing mistakes and show two subtitles at once. Txtloom keeps the times as they are but lists the subtitles that overlap or end before they start, so you can fix them.
    Garbled accents or Chinese characters
    SRT has no character encoding standard, while a WebVTT file must be UTF-8. A file saved in Windows-1252 or GB18030 is detected as not UTF-8, and you choose its encoding under “Read as”.

    Where to use the result

    • Your own web player. The HTML <track> element loads WebVTT files. Copy the line under the result and set srclang and label to the subtitle language.
    • YouTube. YouTube lists WebVTT (.vtt) as a supported format: positioning works, and styling is limited to bold, italic and underline. SRT works there too.

    Questions

    Why do I need VTT instead of SRT?

    For HTML5 video. The <track> element reads WebVTT, so a subtitle file for your own web player has to be .vtt. Platforms such as YouTube accept both.

    Is anything lost in the conversion?

    Only SubRip extras: <font> colours and {\an8}-style position codes. Text, line breaks, times and bold, italic and underline are kept.

    Can I just rename .srt to .vtt?

    No. A renamed file has no WEBVTT line and still uses commas in the timestamps, so it is not a valid WebVTT file.

    Why are the cue numbers gone?

    WebVTT does not need them: a cue identifier is optional. Leaving them out keeps the file valid and smaller.

    Which srclang and label should the <track> line have?

    srclang is the language of the subtitles as a BCP 47 tag, such as en, es or zh-Hans; label is the name viewers see in the subtitle menu. The copied line uses en and English, so change both for other languages.

    Can I convert many SRT files to VTT at once?

    Yes, up to 100 files. Each one is listed with its subtitle count and any problems, and the results download as a ZIP named after the original files.

    My subtitles are two seconds late. Can I fix that here?

    Yes. Enter −2 under “Shift all times” before downloading; every start and end moves together. Times that would go below zero are set to zero.

    Sources