Skip to content

SRT to TTML converter subtitles in the XML the platform asked for.

To convert SRT to TTML, paste the subtitles or drop the .srt and download the .ttml. Each block becomes a paragraph with start and end in milliseconds, italics become TTML styles and line breaks become <br/>. The XML comes out in UTF-8 with a valid header, ready for anyone who asks for TTML or DFXP.

Free, no sign-up
What to do
Output format
Cleanup (optional)

Removes [Music], (laughs), lines with ♪ and capitalized speaker names like PASTOR: at the start of a line.

How to use it

How to convert SRT to TTML

  1. 01

    Paste or drop the .srt

    We accept SRT without numbers, with a dot instead of a comma, or saved as Windows-1252, the usual encoding of older subtitle files.

  2. 02

    Review and clean up

    The report shows the duration, characters per line and reading speed of every subtitle. Fix overlaps before you generate the XML.

  3. 03

    Download the .ttml

    Copy the XML or download the file. If the platform needs the language, fill in the xml:lang attribute at the top before you deliver.

Who asks for TTML subtitles instead of SRT?

TTML is the W3C's XML subtitle format, and requests for it usually come from more formal workflows: streaming platforms, distributors, broadcasters, subtitling vendors and some players and course platforms. Because it is XML, it can carry styling, positioning and metadata, and it goes through automatic validation before it enters the system.

If you are uploading to YouTube or Vimeo, you don't need to convert: both accept SRT. Convert when the delivery spec asks for TTML or DFXP. Watch out for custom profiles, though: some large platforms require their own TTML or IMSC profile with extra rules. The file we write is a generic, valid TTML that works as a starting point, but it may need changes to pass those validators.

DestinationFormat it usually asks for
YouTube and VimeoSRT is fine, no need to convert
Web players with trackVTT
Streaming and distributorsTTML, DFXP or an IMSC profile
BroadcastersTTML or SMPTE-TT
Course platformsCheck the spec

What an SRT looks like inside a TTML

The file starts with the XML declaration and a <tt> tag with the TTML namespaces. The header holds one default, centered style. In the body, each SRT block becomes a <p> with begin and end written as 00:00:01.500: the comma before the milliseconds becomes a dot, and the numbering goes away because TTML doesn't use it.

The text is escaped so it can't break the XML: & becomes &amp; and < becomes &lt;. Italics, bold and underline become spans with tts:fontStyle, tts:fontWeight and tts:textDecoration, always closed in the right order, even when the SRT has a stray open tag.

An SRT block and the TTML we write
subtitles.srt
7
00:01:12,480 --> 00:01:15,020
<i>Do you remember</i>
last week's class?

subtitles.ttml
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling" xml:lang="">
  <head>
    <styling>
      <style xml:id="default" tts:textAlign="center"/>
    </styling>
  </head>
  <body style="default">
    <div>
      <p begin="00:01:12.480" end="00:01:15.020"><span tts:fontStyle="italic">Do you remember</span><br/>last week's class?</p>
    </div>
  </body>
</tt>

What to check before you deliver the TTML

The xml:lang attribute comes out empty, because an SRT doesn't say what language it is in. Many platforms reject a file without it, so change xml:lang="" to xml:lang="en", "pt-BR" or "es" to match the subtitles. It takes seconds in any text editor.

Timings are written as clock time with milliseconds, the most widely accepted form. If the spec wants frame-based times with ttp:frameRate, or positions defined by regions, those have to be added afterwards, since the SRT doesn't carry that information. Color made with <font color> and the {\an8} top-position code don't carry over.

  • Fill in xml:lang with the subtitle's language code.
  • Check whether the platform accepts milliseconds or requires frames.
  • If they ask for .dfxp, see in the spec whether the extension is enough.
  • Run the file through the platform's own validator before delivery.

Overlaps and reading speed: why review first

TTML validators tend to be stricter than a regular player. Two subtitles that overlap by a few milliseconds go unnoticed on YouTube but can block a delivery. That is why it pays to tick the cleanup that fixes overlaps before converting.

The report also flags subtitles over 42 characters per line or above 17 characters per second, common broadcast and streaming references. If your spec uses other limits, the subtitle checker tool lets you change the numbers and apply the TV, Netflix and YouTube presets.

Frequently asked questions

How do I convert SRT to TTML?

Paste the subtitles or drop the .srt, keep TTML as the output and download the .ttml. Each block becomes a <p> paragraph with the same start and end, in milliseconds. It is free, with no signup, and the XML comes out in UTF-8.

TTML or DFXP: which extension should I use?

We save the file as .ttml. DFXP is the name of the first TTML profile, and many platforms accept the same content with a .dfxp extension. If the delivery spec asks for .dfxp, check whether renaming is enough or whether there is a profile with its own rules.

Will the TTML pass on any streaming platform?

We can't promise that. The file is a valid, generic TTML that many platforms accept. Some require their own TTML or IMSC profile, with frame-based times, regions and mandatory metadata. Use our file as the base and run it through the platform's validator.

Why is xml:lang empty?

Because an SRT doesn't state its language, and we'd rather not guess. Open the .ttml in a text editor and fill in the attribute on the <tt> tag, for example xml:lang="en". Many platforms reject the file without that code.

Do italics and colors carry over from SRT to TTML?

Italics, bold and underline do, as tts:fontStyle, tts:fontWeight and tts:textDecoration styles. Color made with <font color> and the {\an8} top-position code don't: the subtitle comes out centered, in the default position.

I received a TTML and need to edit it. Can I go back to SRT?

Yes. Use the TTML to SRT page, edit in your software, then convert back to TTML here. Frame or tick timings in the original file are recalculated to milliseconds on the way in.

No SRT yet? We make the subtitles from your video.

Upload the video or paste a YouTube link. We transcribe it word by word, with the timing of every line, and you download an SRT ready to convert to TTML.

See the result on your own recording before adding a card.