SubtitleFixer
Tools
☕ Support

XML to SRT Converter

To convert XML subtitles to SRT, drop your .xml file on this page: SubtitleFixer checks which kind of subtitle XML it is (TTML/DFXP or YouTube timed text), converts it to numbered SRT subtitles, and does it in your browser without uploading anything.

No file yet

Add a subtitle file to start.

Add a file to preview the conversion.

.xml → .srt

Same converter as TTML to SRT.

Add a file to enable the download.

Your file never leaves your device.

Free XML to SRT conversion that runs in your browser: your files never leave your device, and there is no sign-up. If you need TTML to SRT, this page uses the same converter as TTML to SRT.

How to convert XML to SRT in 3 steps

  1. Add your XML files. Drag one or more .xml files onto the page, or click to choose them.
  2. Check the type. SubtitleFixer shows whether it found TTML, DFXP or YouTube timed text, plus a preview.
  3. Download. Save as SRT, or switch to VTT. Several files download as one zip.

Supported XML subtitle types

The file starts with What it is Supported
<tt ...> TTML or DFXP (W3C Timed Text) Yes
<timedtext ...> YouTube timed text (newer) Yes
<transcript> YouTube timed text (older) Yes
anything else for example video editor project files No

Example: YouTube XML to SRT

Before:

<transcript>
  <text start="1.2" dur="2.6">Hi, and welcome back.</text>
  <text start="4.1" dur="3.35">Today we&amp;#39;re fixing subtitles.</text>
</transcript>

After:

1
00:00:01,200 --> 00:00:03,800
Hi, and welcome back.

2
00:00:04,100 --> 00:00:07,450
Today we're fixing subtitles.

Start plus duration gives the end time: 1.2 + 2.6 = 3.8 seconds. The doubled code &amp;#39; becomes an apostrophe.

Example: TTML (<tt>) to SRT

Before:

<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling">
  <body>
    <div>
      <p begin="00:00:01.200" end="00:00:03.800">Hi, and welcome back.</p>
      <p begin="00:00:04.100" end="00:00:07.450">Today we're<br/><span tts:fontStyle="italic">fixing</span> subtitles.</p>
    </div>
  </body>
</tt>

After:

1
00:00:01,200 --> 00:00:03,800
Hi, and welcome back.

2
00:00:04,100 --> 00:00:07,450
Today we're
<i>fixing</i> subtitles.

The root element is <tt>, so this is TTML (W3C Timed Text). Each <p> becomes one SRT subtitle. <br/> becomes a new line, and the italic span becomes <i>.

What it can and can't do

It can:

  • Detect TTML/DFXP and YouTube timed-text XML and convert them to SRT or VTT.
  • Turn start-plus-duration times into start and end times.
  • Decode HTML codes like &amp; and &#39;, including a code saved twice.
  • Convert many files at once, in your browser.

It can't:

  • Read video editor XML (Final Cut Pro, Premiere Pro, DaVinci Resolve) or other XML formats.
  • Download captions from YouTube. You need the file on your device.
  • Merge the overlapping lines of YouTube auto-captions.
  • Fix subtitles that are out of sync. Use Shift subtitles.

FAQ

Which XML subtitle files can I convert?

Two kinds: Timed Text files (TTML or DFXP, starting with a <tt> element) and YouTube timed-text files (starting with <timedtext> or <transcript>). Other XML files, such as video editor project files, aren't supported, and you get a message saying so.

How do I know what kind of XML file I have?

Open it in a text editor and look at the first element after the <?xml ...?> line. <tt> means TTML or DFXP. <timedtext> or <transcript> means YouTube. You don't have to check: SubtitleFixer detects it and shows the type next to the preview.

Can I convert YouTube caption XML to SRT?

Yes. YouTube timed-text XML gives a start time and a duration for each line, and both are turned into SRT start and end times. HTML codes like &#39; become normal characters, including a code that was saved twice, such as &amp;#39;.

Can I convert Final Cut Pro or Premiere XML?

No. Those are project files, not subtitle files, and their captions are stored differently. Export the captions as SRT from the editor instead.

What gets lost?

Positions, colours and fonts. Text, line breaks and timings are kept, plus italic, bold and underline in TTML files.

Can I get VTT or plain text instead?

You can switch the output to VTT. For plain text, convert to SRT first and then use SRT to TXT.

Is my file uploaded?

No. SubtitleFixer converts XML subtitles inside your browser, and your file never leaves your device. There is no sign-up.

Can I convert TTML to SRT on this page?

Yes. A TTML file starts with a <tt> element, and this page converts it to SRT the same way as TTML to SRT. If your file uses a .ttml extension, you can drop it here or on that page.

What's the difference between TTML and DFXP?

DFXP is the older name for the first version of TTML (W3C Timed Text). Both are XML files that start with <tt>. This page accepts both; it labels a file as DFXP when it uses the older TTAF namespace. DFXP to SRT is the same converter under that name.