How to convert SRT to TTML
- Drop an .srt or .vtt file into the box above. The file card shows the number of subtitles and when the last one ends.
- Check the notes. If the SRT wasn't saved as UTF-8, a note says it was read as Windows-1252; make sure accented letters look right in the preview.
- Type the language of the subtitles into the "Language code" field, for example en, fr, de, pt-BR or ja. It starts as en.
- Press "Convert and download" to save the .ttml file.
What the TTML file contains
The output is a small, readable XML document:
- An XML declaration saying the file is UTF-8.
- A <tt> root in the TTML namespace (http://www.w3.org/ns/ttml) with xml:lang set to the code you typed.
- A <head> with one style: centred, white text.
- A <body> with one <div>, and one <p> element per subtitle, each with begin and end attributes.
7, then 00:00:41,250 --> 00:00:44,900, then "Fish & chips" and "on Fridays" on two lines
<p begin="00:00:41.250" end="00:00:44.900">Fish & chips<br/>on Fridays</p>
The times keep all three millisecond digits, written as clock time with a full stop instead of SRT's comma, so nothing is rounded. Line breaks become <br/>. Characters that would break XML (&, <, > and double quotes) are escaped, which is why the ampersand reads & in the file. Cue numbers are dropped, since TTML doesn't use them, and subtitles with zero or negative length are left out.
Why the language code matters
xml:lang tells players and platforms which language the text is in. Some use it to label the track in a captions menu, screen readers and renderers can use it for pronunciation and line breaking, and validators for delivery specs often require it. Use a standard language tag: two letters for the language (es), plus a region or script where it matters, such as es-419, pt-BR, pt-PT or zh-Hans. Check the exact form your platform expects; some want a specific region code.
If you deliver captions in several languages, convert each SRT separately and give each its own code. When you don't have those languages yet, the video translator produces translated SRT and VTT subtitles from a video's audio in 21 languages, at 1 credit (0.1¢) per minute with a minimum of 5 credits per file.
SRT to DFXP
DFXP is the name TTML had in its draft stages, and it lives on in profile names and in the .dfxp extension that some systems ask for. The converter saves with .ttml. If a platform insists on .dfxp, renaming the file is usually enough, because the content is TTML either way; YouTube, for example, reads .dfxp files as TTML. Very old systems built around the draft-era DFXP namespace may expect a different xmlns value, so if one rejects the renamed file, check its documentation.
Profiles and delivery specs: read this before you submit
The file declares no profile. Under the TTML 1 recommendation, a document with no profile, in a context that doesn't name one, falls under the DFXP Transformation profile, which is the most general case. Many delivery targets go further and define their own TTML profile: IMSC1 for online media, EBU-TT-D in European broadcasting, SMPTE-TT, Apple's iTT, and house specifications from streaming services. Those can require things this generic file doesn't include, such as a profile declaration, named regions for top and bottom placement, frame-based timing with a declared frame rate, line-length limits, or extra metadata.
So treat the output as clean, valid TTML to start from, not as a file guaranteed to pass a specific broadcaster's or platform's checker. If you have a spec sheet, compare its required attributes against the structure above and add what is missing in a text editor, or ask the recipient which profile they validate against.
One practical point: the file defines no layout region, so where the text sits is up to the player. Players differ, and a strict TTML renderer may start the text at the top of the picture. Test it in the target player before delivery.
What is not carried over
- Italic, bold and colour tags in the SRT (<i>, <b>, <font>) are removed when the file is read, so every line uses the one centred white style.
- Position tags like {\an8} are removed too.
- VTT cue settings (line, position, align) and VTT style blocks are not converted.
- Comments, NOTE blocks and cue identifiers are not part of the output.
Check the SRT first
A converter can only carry over what is in the SRT. Overlapping subtitles, lines that are too long or flash by too quickly will all reach the TTML unchanged. The SRT checker points out common problems, and the free subtitle editor lets you fix them against the video, with warnings for lines over 42 characters, reading speeds above 21 characters per second, subtitles under 0.8 seconds and overlaps. If the text shows strange characters, re-save it with the subtitle encoding converter before converting.
Limits
- One file at a time, text only, up to 20 MB.
- TTML output only on this page. To go back, TTML to SRT reads TTML, DFXP and XML subtitles, including frame and tick timing.
- The text is never translated by the converter.
New to the source format? What is an SRT file explains each part of an SRT cue.
More free tools
- ASS to SRT Converter
- SRT to ASS Converter
- SBV to SRT Converter
- TTML to SRT Converter
- SUB to SRT Converter for MicroDVD and SubViewer Files
- LRC to SRT Converter
- SRT to LRC Converter
- VTT to TXT: Turn WebVTT Captions into Plain Text
- TXT to SRT: Turn a Script into Timed Subtitles
- SRT to Word Converter
- SRT to Excel Converter
- Merge SRT Files (or Split One)
- Dual Subtitles Maker: Two Languages in One File
- Subtitle Frame Rate Converter: 23.976, 25, 29.97 and More
- Convert SRT to UTF-8: Fix Garbled Subtitle Characters
- Remove Hearing-Impaired Text from SRT Subtitles
Turn the file into text
Prefer one workspace for all mydubly tools? Open this tool in the dashboard · Browse every tool
Frequently asked questions
Can I save the result as a .dfxp file?
The download uses .ttml. Renaming it to .dfxp usually works, since DFXP is TTML's older name, but check that the receiving system accepts the TTML namespace.
Which language code should I type?
A standard language tag such as en, fr, es-419, pt-BR or zh-Hans that matches the subtitle text. The field starts as en, so change it for any other language.
Will this TTML pass a streaming service or broadcaster spec?
Not necessarily. It is generic TTML with no profile declaration or regions, and platform profiles such as IMSC1 or EBU-TT-D can require more. Compare it with the spec before delivery.
Which TTML profile does the output follow?
None is declared, so under the TTML 1 recommendation it falls under the DFXP Transformation profile unless the receiving system specifies another.
Are italics from my SRT kept in the TTML?
No. SRT tags are removed when the file is read, and every line uses one centred white style.
How do I make TTML files in several languages?
Convert one SRT per language, entering the matching language code each time, so each TTML is labelled correctly.