SubtitleMedic

Convert SRT to TTML

Turn SubRip subtitles into TTML (Timed Text) for broadcasters, streaming platforms and web players.

Processed in your browserNo sign-up.srt

How to convert SRT to TTML

  1. Open your .srt file

    Drop one SubRip file into the box above, or click to browse. It’s read by your browser and never uploaded.

  2. Check what changes

    The Conversion box lists what the TTML file adds and leaves out. The preview shows the whole file before and after, so you can see the XML it writes.

  3. Download the .ttml file

    Save the converted file. It keeps the original name with the new extension, so movie.en.srt becomes movie.en.ttml.

What the converter writes

<?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>
    <layout>
      <region xml:id="bottom" tts:origin="10% 10%" tts:extent="80% 80%" tts:displayAlign="after"/>
      <region xml:id="top" tts:origin="10% 10%" tts:extent="80% 80%" tts:displayAlign="before"/>
    </layout>
  </head>
  <body region="bottom">
    <div>
      <p begin="00:00:03.120" end="00:00:05.480">Is this seat taken?</p>
      <p begin="00:00:17.020" end="00:00:19.410"><span tts:fontStyle="italic">[train whistle blows]</span></p>
    </div>
  </body>
</tt>

TTML 1. The file uses the W3C TTML namespace, the one every current TTML and DFXP reader expects.

Two regions. Subtitles go in a box at the bottom of the picture. Lines that SubRip marks with {\an8}, {\an7} or {\an9} go in the same box anchored at the top, which is where players put them.

Clock times. Times are written as hours:minutes:seconds.milliseconds, the same moments as in your SubRip file, so nothing depends on a frame rate.

Lines and styles. A line break inside a subtitle becomes <br/>. Italic, bold and underline become <span> elements with the matching style.

Safe text. Characters that mean something in XML, such as & and <, are escaped, and tags that SubRip files often leave unclosed are closed in the right order. The file is always valid XML.

What is left out

SubRip files sometimes carry codes from ASS, such as {\c&H00FFFF&} for a colour or {\pos(320,50)} for an exact position. TTML could express some of them, but every platform handles styling differently, and a plain, centred subtitle is the one that's accepted everywhere. Those codes are removed and counted in the notice above the Download button.

A line placed in the middle of the picture, or on the left or right, ends up in the centred region at the top or the bottom. Font tags such as <font color> are removed too.

When you need TTML

  • Broadcasters and distributors. Many delivery specs ask for TTML or one of its profiles, such as EBU-TT or IMSC, rather than SubRip.
  • Streaming and video platforms. Some platforms ask for DFXP or TTML captions, especially for professional uploads.
  • Web players. Players built on standards often read TTML or IMSC directly.

If the platform asks for WebVTT instead, use Convert SRT to VTT. For Apple, use Convert SRT to ITT.

Tips

Check the spec. Delivery specs often name a profile, a frame rate or extra metadata. This page writes plain TTML 1, which most of them accept. A strict profile may still ask for changes.

Keep a SubRip copy. It's the easiest format to edit later. If you need to change a TTML file, Convert TTML to SRT turns it back.

Fix problems first. Overlapping lines and broken numbering carry over into the TTML file. Clean them up with Fix SRT File before you convert.

Frequently asked questions

What is TTML?

TTML, Timed Text Markup Language, is the W3C's XML format for subtitles. Each subtitle is a <p> element with a begin and an end time, and the file can describe styles and screen regions. Broadcasters, streaming platforms and professional subtitling tools use it to exchange subtitles.

Is TTML the same as DFXP?

Yes, for most purposes. DFXP was the name of TTML 1.0 while it was being written, and many platforms still call the format DFXP. If a platform asks for a .dfxp file, the file from this page works for most of them; rename it from .ttml to .dfxp.

What does the converter keep?

Every word, line break and time. Italic, bold and underline become styled spans. A line that SubRip places at the top with {\an8} goes into a region at the top of the picture. Other ASS codes, such as colours, fonts or exact positions, are left out, and a notice above the Download button says how many.

Which language does the file say it is in?

None. The file's xml:lang is left empty, which TTML reads as "not stated". Most platforms ask for the language separately when you upload. If yours needs it in the file, Convert SRT to ITT lets you pick one.

Do I need Apple's iTT format instead?

Only for Apple. iTT is TTML with Apple's rules, which write times as video time code at a fixed frame rate. For the Apple TV app or the iTunes Store, use Convert SRT to ITT. For anything else that asks for TTML or DFXP, this page is the one.

Are my subtitle files uploaded anywhere?

No. The file is read and converted by JavaScript in this browser tab. It never leaves your device, and the tool keeps working if you go offline after the page has loaded.