TTML to SRT converter DFXP and TTML captions to SubRip
Paste the XML or open .ttml, .dfxp and .xml files. Begin, end and dur times in clock time, frames, ticks or seconds are worked out, <br/> becomes a line break and italic spans become <i>. Nothing is uploaded.
TTML or DFXP
Paste or open .ttml, .dfxp or .xml filesSRT
Waiting for inputFiles
Choose a file to see and edit it above.Converted in this browser tab; files are not uploaded.
How do I convert TTML or DFXP to SRT?
TTML is XML: each subtitle is a <p> with a begin and an end or dur, and <br/> breaks lines. DFXP is the older name of the same format. Times can be clock times (00:00:03.500, or with frames 00:00:03:12) or offsets such as 8.2s, 150ms, 45f or 35000000t; frames and ticks depend on ttp:frameRate and ttp:tickRate on the <tt> element (TTML1 §10.3.1). The converter works all of these out and writes SRT.
- Paste the XML, or open or drop one or more .ttml, .dfxp or .xml files.
- Shift all times if needed.
- Download the .srt, or a ZIP for several files.
Example: before and after
<?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="italic" tts:fontStyle="italic"/>
</styling>
</head>
<body>
<div>
<p begin="10000000t" end="35000000t">Welcome back to <span style="italic">Field Notes</span>,<br/>the show about small projects.</p>
<p begin="00:00:03.500" end="00:00:07.900">Today I’m talking with Maya & friends.</p>
<p begin="8.2s" dur="1.8s">[Birdsong]</p>
</div>
</body>
</tt>1 00:00:01,000 --> 00:00:03,500 Welcome back to <i>Field Notes</i>, the show about small projects. 2 00:00:03,500 --> 00:00:07,900 Today I’m talking with Maya & friends. 3 00:00:08,200 --> 00:00:10,000 [Birdsong]
With ttp:tickRate="10000000", 10000000t is 1 second and 35000000t is 3.5 seconds. 8.2s plus dur 1.8s ends at 10 seconds. <br/> becomes a line break, the span styled italic becomes <i>, and & becomes &.
What the converter changes
| In the input | Result | Details |
|---|---|---|
| <p begin end> | Becomes a subtitle | With dur instead of end, the end is begin + dur. |
| Clock time 00:00:03.500 | Read | Fractions of a second as written. |
| Clock time with frames 00:00:03:12 | Read | Frames ÷ ttp:frameRate (× ttp:frameRateMultiplier); 30 frames per second if the file sets none, as TTML1 specifies. |
| Offsets 1.5h, 2m, 8.2s, 150ms | Read | |
| Frames 45f and ticks 35000000t | Read | Ticks ÷ ttp:tickRate. Without a tick rate, frame rate × sub-frame rate, or 1 tick per second. |
| begin on <body> or <div> | Added | A subtitle’s times count from the begin of the elements around it. |
| <br/> | Line break | |
| tts:fontStyle italic, fontWeight bold, textDecoration underline | Changed | Become <i>, <b>, <u>, whether set on the element or through a style id in <head>. |
| Colours, fonts, regions and positions | Removed | SRT has no standard place for them. |
| &, <, >, &#…; entities | Changed | Written as the characters they stand for. |
| <p> without begin, or without end and dur | Left out | The summary counts these. |
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
- All the times are huge, like 10000000 seconds
- The file uses ticks (
t) but the tick rate was ignored. Herettp:tickRateon<tt>is read, so10000000tat a tick rate of 10000000 is 1 second. - Times drift slowly out of sync
- Frame-based times need the right frame rate. Check
ttp:frameRateandttp:frameRateMultiplier(for example 30 and “1000 1001” for 29.97 fps) on the<tt>element; TTML1 assumes 30 fps when none is given. - Subtitles are missing
- A
needs its own begin time, or one on a surrounding
or , plus an end or a duration. Timing set only on elements inside theis not read; the summary counts the
elements left out.
- Text that was positioned at the top is now at the bottom
- TTML regions place text anywhere on screen; SRT has no regions, so every subtitle is shown in the player’s default place.
- The file will not read at all
- Check that it is TTML: it should contain a element in the namespace http://www.w3.org/ns/ttml. Other XML caption formats, such as SMPTE-TT with images, are not supported.
Where to use the result
- YouTube and players. .srt is accepted by YouTube and on VLC’s list.
- Video editors. Most editors that import captions read SRT; convert the TTML first.
- Txtloom editor. Open the result in the editor to correct words or times.
Related guides
- SRT vs VTT: which subtitle file do you need?The same transcript exported both ways, and what each format can and cannot carry.
- What is an SRT file?The four parts of every subtitle block, what the format leaves undefined, and how to open one.
- How to make an SRT fileBy hand, from a recording, or from text you already have, with the checks to run before upload.
Questions
Is DFXP the same as TTML?
Yes. DFXP (Distribution Format Exchange Profile) is what TTML was called in earlier drafts; the W3C TTML1 specification keeps the name for profiles and older URLs. .dfxp files are TTML documents.
What are ticks in TTML?
A time unit set by ttp:tickRate: with a tick rate of 10,000,000, one tick is a ten-millionth of a second, so 35000000t is 3.5 seconds.
Does it keep italics?
Yes. Spans with tts:fontStyle="italic", directly or through a style in <head>, become <i>; bold and underline work the same way.
Does it read namespaced files like <tt:p>?
Yes. Prefixes such as tt: and tts: are ignored when reading element and attribute names.
Can I convert several files at once?
Yes, up to 100, downloaded as one ZIP.
Is my file uploaded?
No. The XML is read in this browser tab.
Sources
- W3C: Timed Text Markup Language 1 (TTML1), Third Edition, checked 7 Nov 2026
- YouTube Help: Supported subtitle and closed caption files, checked 7 Nov 2026
- VLC user documentation: Subtitles, checked 7 Nov 2026