Subtitle guide Conversion guides

How to convert XML subtitles to SRT


TL;DR — Convert TTML, DFXP, and timed-text XML caption files into standard SRT subtitles for upload, editing, review, and archive workflows.

Related tool

XML to SRT Converter

Open XML to SRT

Some subtitle exports are saved as XML instead of a simple .srt file. In caption workflows, that usually means a timed-text XML format such as TTML or DFXP, where each subtitle cue is stored inside XML elements with timing attributes.

SRT is easier to upload, validate, edit, and send for review because it uses numbered cues and standard timestamp lines.

Quick answer

Use the XML to SRT Converter to convert timed-text XML subtitle files into standard SubRip captions. The tool reads TTML or DFXP-style <p> cues, strips XML wrapper and styling metadata, and creates SRT output locally in your browser with no upload.

When to convert XML subtitles to SRT

Convert XML subtitles to SRT when:

  • a platform export gives you a .xml, .ttml, or .dfxp caption file
  • an editor, upload form, or review workflow expects SubRip subtitles
  • a client wants a readable subtitle copy without XML metadata
  • you need to validate, clean, shift, or merge the captions with SRT tools
  • an archive workflow needs a simple fallback file alongside the XML source

Keep the original XML file if you still need regions, styles, positioning, language metadata, or broadcast-specific details. SRT is a practical delivery copy, not a full XML replacement.

Supported XML subtitle structure

The converter expects timed-text XML cues, commonly TTML or DFXP:

<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml">
  <body>
    <div>
      <p begin="00:00:01.000" end="00:00:03.500">Welcome back to the edit.</p>
      <p begin="00:00:04.200" end="00:00:06.000">This XML cue needs SRT output.<br/>Keep the line break.</p>
    </div>
  </body>
</tt>

That becomes:

1
00:00:01,000 --> 00:00:03,500
Welcome back to the edit.

2
00:00:04,200 --> 00:00:06,000
This XML cue needs SRT output.
Keep the line break.

What changes during conversion

During conversion, the tool:

  • reads timed XML paragraph cues with begin and end timing
  • supports common duration timing when a cue uses begin plus dur
  • turns XML line breaks into subtitle line breaks
  • removes TTML or DFXP wrapper tags, regions, styles, and spans
  • decodes common HTML/XML entities
  • generates sequential SRT cue numbers

The output keeps readable timing and text. It does not preserve XML styling, positioning, regions, speaker metadata, or advanced broadcast semantics.

Step-by-step workflow

  1. Save a copy of the original .xml, .ttml, or .dfxp subtitle file.
  2. Open the XML to SRT Converter.
  3. Upload or paste the timed-text XML subtitle content.
  4. Convert the file to SRT.
  5. Review cues that used nested <span> or <br> markup.
  6. Run the output through the SRT Validator before upload.

Common mistakes

Using arbitrary XML instead of subtitle XML

The converter expects timed subtitle cues. A generic XML file without begin, end, or dur timing on caption paragraphs is not enough to create SRT timestamps.

Expecting SRT to preserve XML styling

SRT does not support regions, style definitions, positioning, or XML metadata. If those details matter, keep the XML subtitle file as the source of truth and use SRT only as a simple delivery or review copy.

Skipping validation after conversion

XML subtitle exports can include nested spans, empty paragraph cues, or timing values from a specific platform. After conversion, validate the SRT file and scan the first, middle, and final cues before upload.

FAQ

How do I convert XML subtitles to SRT?

Open the XML to SRT Converter, paste or upload a timed-text XML subtitle file such as TTML or DFXP, and export the timed paragraphs as numbered SRT cues.

What XML subtitle formats are supported?

The converter supports TTML or DFXP-style XML captions with timed paragraph cues. It is not intended for arbitrary XML documents that do not contain subtitle timing.

Can I convert XML subtitles without uploading the file?

Yes. The converter runs locally in your browser, so the XML subtitle text stays on your device.

Use the XML to SRT Converter

Convert timed-text XML subtitles to SRT online for free, locally in your browser with no upload. No signup, no upload, and everything runs locally in the browser.

Open XML to SRT