Skip to main content
Subtitlio
Menu

TTML to SRT converter, for DFXP files too

Turn TTML or DFXP subtitles from a streaming service or a broadcaster into an SRT file for players, TVs and video editors. Free, no signup, nothing uploaded.

Open a subtitle file

SRT, VTT, ASS, SSA, SBV, SMI, TTML, TXT, or a ZIP from a subtitle site

Your file stays on this device. Nothing is uploaded. How?

How it works

  1. 1 Open your TTML or DFXP file Pick it, drop it or paste the text. Files ending in .ttml, .dfxp or .xml all open, because the format is read from what is inside.
  2. 2 See what SRT keeps The SRT is written at once. Italics, colors and lines at the top of the screen are kept; fonts, backgrounds and exact places are listed with a count before you download.
  3. 3 Download the SRT Saved as UTF-8 under your file name, with only the extension changed, ready for VLC, Plex, Jellyfin, a TV or a video editor.

Your files stay on this device

Opening, checking, fixing, syncing and converting all happen in your browser. Your subtitle file and its text are never sent to our server, so we never store or log them.

Read the privacy policy

TTML, DFXP and SRT

TTML (Timed Text Markup Language) is the W3C's subtitle format, written in XML. DFXP is the name of its early versions, and many tools still use it. Streaming services and TV broadcasters deliver subtitles this way, so the files you save from them often end in .ttml, .dfxp or just .xml. Most players, TVs and video editors outside the browser read SRT instead.

TTML can do much more than SRT: styles with fonts and backgrounds, regions that place text anywhere on the picture, and three different ways of writing time. The converter reads all of that and keeps what SRT can hold.

In the TTML or DFXP file In the SRT file
Clock times, frames such as 00:00:01:12, or ticks such as 15015000t Exact times in milliseconds: 00:00:01,502
A begin on a div or on the body that the lines count from Added up, so each line has its own time in the video
<br/> line breaks The same rows
Italic, bold and underline, set on the line or in a style <i>, <b> and <u>
Text colors <font color>, which most players show; white, the usual color, needs no tag
A region at the top of the screen {\an8}, which VLC, mpv and most players follow
A line placed elsewhere, such as at the left or partway up The nearest of top, middle or bottom; the report counts these lines
Fonts, sizes, backgrounds and outlines Dropped; SRT has no place for them
The title, copyright and other details in the header Dropped
The file's language, xml:lang Not written in SRT; it fills in the language when you translate the file here
Pictures of text instead of text Not converted; they hold no letters to read

Before you download, one sentence says what will change, and See the differences lists each kind with the number of lines. Nothing is dropped without a count.

Example: a TTML file and its SRT result

These are the first lines of a TTML file in the style streaming services use. Times are in ticks, ten million to a second, and the sound at the top of the screen is in italics:

<?xml version="1.0" encoding="utf-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" ttp:tickRate="10000000" xml:lang="en">
  <head>
    <styling>
      <style xml:id="s1" tts:fontStyle="italic"/>
    </styling>
    <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>
    <div>
      <p begin="15015000t" end="38371666t" region="bottom">Is this the last ferry tonight?</p>
      <p begin="39205833t" end="62145416t" region="bottom">- It leaves in ten minutes.<br/>- Then we run.</p>
      <p begin="62979583t" end="80080000t" region="top"><span style="s1">[horn blows]</span></p>
    </div>
  </body>
</tt>

This is the SRT file the converter writes from it:

1
00:00:01,502 --> 00:00:03,837
Is this the last ferry tonight?

2
00:00:03,921 --> 00:00:06,215
- It leaves in ten minutes.
- Then we run.

3
00:00:06,298 --> 00:00:08,008
{\an8}<i>[horn blows]</i>

Each tick time became milliseconds: 15,015,000 ticks are 1.5015 seconds, written as 00:00:01,502. The two rows of the second line stay two rows. The line in the top region got {\an8}, so players that follow it show the sound at the top, and the style s1 became <i>. The regions and the style names themselves have no place in SRT, so they are gone, and no words changed.

How the times are read

TTML files write time in several ways, and a file may mix them. Clock times look like 00:01:02.500. Frame times such as 00:01:02:12 count frames at the file's frame rate, including rates like 23.976 written as ttp:frameRate="24" with ttp:frameRateMultiplier="1000 1001", and drop-frame timecode in SMPTE files. Tick times such as 625625000t use the file's tick rate. Short forms such as 1.5s, 90f or 250ms work too.

A line's time can also come from the parts of the file around it: a div with begin="10s" moves every line inside it ten seconds later, and a line with no end shows until the part around it ends. When words inside one line have times of their own, as in captions that appear word by word, each step becomes a line of its own, so the SRT shows what the original shows.

Common problems

What you see What to do
The file ends in .xml and your player shows nothing Open it here anyway; a TTML file is found by its content, whatever its name
"Some lines have no end time" in the check The file left them open. Each now ends when the next line starts, at most 8 seconds later; check them in the line list
"Some lines in this file are pictures of text" Some TTML files carry pictures of the words instead of text. They cannot become SRT here; look for a text version of the subtitles
The subtitles are a few seconds early or late in your copy of the video Sync subtitles moves every line, or stretches them to fix drift
You need captions for a web player, not SRT Convert the SRT with SRT to VTT, or choose VTT in the subtitle converter

Frequently asked questions

What is a TTML file?

A subtitle file written in XML, following the W3C's Timed Text Markup Language. Each line is a <p> element with a begin and an end time, and styles and regions in the file's header say how the text looks and where it goes.

Is DFXP the same as TTML?

Almost. DFXP was the name of TTML's draft versions, and many .dfxp files use the older XML namespace. The converter reads both, and the IMSC and EBU-TT-D variants that broadcasters use.

Can I convert SRT to TTML?

Not yet. The converter reads TTML and DFXP and writes SRT, VTT, ASS, SSA, SBV, SMI and plain text. To save a TTML file as VTT or ASS instead of SRT, open it in the subtitle converter and choose the format.

Can I translate a TTML file?

Yes. Open it on translate subtitles: the file's language is filled in for you, and the translation downloads as SRT.

Is it free?

Yes. The conversion runs in your browser, so there is no signup and your file is never uploaded.