Free online XML to SRT converter
Convert caption XML into compatible, editable SRT subtitles and verify timing and lost formatting.
Convert XML to SRT online - free
Your file is processed instantly and deleted as soon as you download it.
Import a file from a URL
Paste a direct link to the file. We download it to our server and it is converted exactly like an upload.
How it works
-
1/3
Upload your .xml file
Click to browse to select your file you want to convert or simply drag & drop your file into selected area.
-
2/3
Perform .xml to .srt conversion
After successful file upload, click to convert when you are ready.
-
3/3
Download converted .srt file
Conversion result is ready to download.
How to convert xml to srt file
- Video subtitles
- No ratings yet.
A video editor, media player, or caption service may require SRT when captions were exported as XML from another system. Converting the file makes the subtitles portable and editable, but only if the XML contains identifiable cue text and timing data.
What the XML format is
XML is a structured markup language, not one subtitle format. Caption and transcript systems use different XML schemas, including TTML/DFXP, EBU-TT, Final Cut Pro XML, and proprietary exports from editing, broadcast, and speech-to-text software.
A caption XML file may store cues in elements such as <p begin="00:00:01.000" end="00:00:04.000">, or use attributes named start, end, in, out, or duration. Final Cut Pro XML can describe an editing project rather than contain directly usable subtitle cues, so it may require export from the original application before conversion.
XML has no universal subtitle structure. Renaming captions.xml to captions.srt does not convert it; software must identify the timing fields, extract visible text, and rewrite the data in SRT syntax.
What the SRT format is
SRT is a plain-text format supported by most video players, non-linear editors, media servers, and subtitle platforms. Each cue contains a sequential number, a start and end time, subtitle text, and a blank line:
1
00:00:01,000 --> 00:00:04,000
Example caption.
SRT timestamps use commas before milliseconds and the form HH:MM:SS,mmm. XML subtitles may instead use decimal seconds, periods, frame numbers, clock time, ticks, or ISO 8601 durations. SRT is small, easy to edit in a text editor, and widely compatible, but it carries much less metadata and styling than most XML caption schemas.
Convert recognized XML with Subtitle Edit
- Make a backup of the source XML.
- Install the current desktop version of Subtitle Edit, an open-source subtitle editor for Windows.
- Open the file through File → Open. Subtitle Edit can import several standard subtitle and caption formats, but support depends on the specific XML schema.
- Check the imported cues in the subtitle grid and timeline. Compare the first, middle, and final cues with the source or video, and check line breaks and non-Latin characters.
- Export through File → Save as, select
SubRip (*.srt), and choose UTF-8 encoding if the dialog provides an encoding option.
If the file opens as ordinary XML, imports no cues, or produces incorrect times, it is probably an unsupported or project-specific schema. Inspecting the XML in a text editor can reveal whether it contains actual caption text and timing data; do not treat a successful file opening as proof of a correct conversion.
Use an online converter for documented, non-sensitive files
Online caption services such as Happy Scribe and VEED support selected subtitle and caption formats, but XML support varies by product and may be limited to a named schema such as TTML. Verify that the service explicitly lists the exact XML type before uploading. Do not upload confidential, unreleased, or personally identifying captions unless third-party processing is permitted.
Generic XML-to-text or XML-to-SRT websites often select the wrong elements, ignore namespaces, treat milliseconds as seconds, or return an empty file. Download the result, open it in a subtitle editor, and compare its timings with the video before using it.
Convert a predictable custom schema with Python
A script is suitable when each cue has recognizable start, end, and text values. This example supports clock times and numeric seconds, plus duration values:
import re
import sys
import xml.etree.ElementTree as ET
def seconds(value):
value = value.strip().replace(',', '.')
if re.fullmatch(r'\d+(?:\.\d+)?', value):
return float(value)
match = re.fullmatch(r'(\d+):(\d{2}):(\d{2})(?:\.(\d+))?', value)
if not match:
raise ValueError(f'Unsupported time: {value}')
h, m, s, fraction = match.groups()
return int(h) * 3600 + int(m) * 60 + int(s) + float('0.' + (fraction or '0'))
def srt_time(value):
ms = max(0, round(value * 1000))
h, remainder = divmod(ms, 3600000)
m, remainder = divmod(remainder, 60000)
s, ms = divmod(remainder, 1000)
return f'{h:02}:{m:02}:{s:02},{ms:03}'
root = ET.parse(sys.argv[1]).getroot()
cues = []
for element in root.iter():
start = element.get('start') or element.get('begin')
end = element.get('end')
duration = element.get('duration') or element.get('dur')
if not start or (not end and not duration):
continue
start = seconds(start)
end = seconds(end) if end else start + seconds(duration)
text = ' '.join(''.join(element.itertext()).split())
if text and end > start:
cues.append((start, end, text))
cues.sort()
with open(sys.argv[2], 'w', encoding='utf-8', newline='\n') as output:
for number, (start, end, text) in enumerate(cues, 1):
output.write(f'{number}\n{srt_time(start)} --> {srt_time(end)}\n{text}\n\n')
Run it with python xml_to_srt.py captions.xml captions.srt. Change the attribute names and cue selection for the source schema. The script does not interpret frame-based SMPTE timecodes, ISO 8601 durations, ticks, undocumented millisecond units, XML namespaces requiring qualified lookup, or separate styling and speaker elements. It also collapses embedded line breaks into spaces; replace that text-processing line if line structure must be preserved.
Check timing, encoding, and lost metadata
- Confirm the time basis before conversion. Frame counts require the source frame rate; numeric values may represent seconds, milliseconds, or ticks.
- Convert relative durations correctly: a cue with
beginanddurends atbegin + dur. - Check for overlapping cues, zero-length cues, reversed times, missing text, duplicate cues, and multiple language tracks. SRT readers handle these cases inconsistently.
- Preserve the XML-declared character encoding while reading the source and save the SRT as UTF-8. Inspect accented characters and non-Latin scripts after export.
- Expect to lose XML-specific features such as positioning, colors, fonts, speaker metadata, karaoke timing, reading order, and complex line styling. Recreate essential speaker labels or formatting manually.
- Open the resulting SRT in Subtitle Edit or another subtitle editor and preview it against the video. Check the first and last cues, scene changes, line breaks, and synchronization before delivery.
XML vs SRT: format comparison
How the XML and SRT formats compare on the properties that matter most for this conversion.
| Property | .XML Extensible Markup Language | .SRT SubRip Subtitle |
|---|---|---|
| Open standard | Yes | Partly open |
| Compression | Uncompressed | Uncompressed |
| Typical file size | Small | Very small |
| Opens in a web browser | Yes, natively | Partial |
| Further editing | Easy | Easy |
| Metadata support | Basic | Basic |
| Plain-text readable | Yes | Yes |
| Best used for | Data exchange | Sharing and distribution |
| Introduced | 1998 | 1997 |
| Developer | W3C | Unknown / SubRip community |
| MIME type | application/xml | application/x-subrip |
Suggested software and links: xml to srt converters
Frequently asked questions
Is the XML to SRT converter free?
Yes, converting XML to SRT on 101convert.com is completely free. No registration, email address or installation is required. If you need a higher file size limit or want to convert more files at once, see our plans.
How large can my XML file be?
You can upload XML files up to 100 MB and convert up to 100 files at once in a single batch.
What happens to my uploaded files?
Files are processed automatically and deleted from our servers within a few minutes after conversion. We never view or share your files.
Do I need to install any software to convert XML to SRT?
No. The XML to SRT conversion runs entirely online in your browser and works on Windows, Mac, Linux, Android and iPhone.
Did the conversion fail?
In most cases, the cause is an incorrect file format. Please upload a valid XML file for this XML to SRT conversion. Occasionally, the issue may be on our side. We analyze recurring conversion failures and disable or fix the converter if we detect a defect.
Will XML caption formatting and positioning be lost when converting to SRT?
Usually, yes: SRT keeps cue numbers, start and end times, and subtitle text, but XML styling, colours, speaker metadata, screen positioning, and other attributes may be flattened or discarded. Basic line breaks are often preserved, depending on the XML caption format.
Will the subtitle timing stay accurate when converting XML to SRT?
It can stay accurate if the XML uses supported timecodes and the correct time base, but frame-based or format-specific timing may need conversion. A frame-rate mismatch can shift cue starts and ends, while overlapping or malformed cues may be changed or rejected.
Why does my XML subtitle conversion produce missing or empty SRT cues?
Generic XML is not automatically a caption format, so the conversion may fail when the file uses an unsupported caption structure, namespaces, timing fields, or text elements. The XML must contain recognizable caption entries with readable text and valid start and end times.
Can I convert an SRT back to the original XML without losing information?
Usually not, because SRT cannot represent all XML caption data such as detailed styling, positioning, metadata, and custom timing fields. The resulting SRT remains editable as plain subtitle text, but converting it back generally requires recreating the discarded information.
Additional formats for
xml file conversion
Reverse conversion
Convert to srt from
other formats
- mks to srt
- word to srt
- ass to srt
- lrc to srt
- mp4 to srt
- wav to srt
- stl to srt
- rtf to srt
- mkv to srt
- vtt to srt
- 3gp to srt
- 890 to srt
- aac to srt
- amr to srt
- avi to srt
- cip to srt
- dfxp to srt
- doc to srt
- flac to srt
- idx to srt
- itt to srt
- m4a to srt
- m4v to srt
- mov to srt
- ogg to srt
- opus to srt
- pac to srt
- pdf to srt
- sbv to srt
- scr to srt
- smi to srt
- ssa to srt
- sub to srt
- sup to srt
- text to srt
- ttml to srt
- txt to srt
- vobsub to srt
- webm to srt
- wma to srt
- zip to srt