TTML Subtitle Format
What this format can express
- Text styling
- Fonts, colour, outline, shadow
- On-screen positioning
- Yes
- Karaoke timing
- No
- Line breaks inside a cue
- Yes
- Timeline
- Start and end time for every cue
- Timing resolution
- 1 ms
- Timing stored as frame numbers
- No
- Right-to-left text
- Yes
Examples
A typical TTML file, and what is read out of it
File
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling" xml:lang="en">
<head>
<styling>
<style xml:id="s1" tts:color="#FFFF00" tts:fontWeight="bold"/>
</styling>
<layout>
<region xml:id="bottom" tts:origin="10% 80%" tts:extent="80% 20%"/>
</layout>
</head>
<body>
<div>
<p begin="00:00:01.000" end="00:00:03.500" region="bottom" style="s1">Hello <span tts:fontStyle="italic">there</span>.</p>
<p begin="00:00:03.500" end="00:00:06.000" region="bottom">How are you?<br/>Fine, thanks.</p>
</div>
</body>
</tt>
What it holds
2 cues, 3 lines of text
00:00:01.000 → 00:00:03.500
Hello there. [italic ×1]
[region="bottom" style="s1"]
00:00:03.500 → 00:00:06.000
How are you?
Fine, thanks.
[region="bottom"]
Outside the cues:
prolog an XML declaration and the namespace bindings, kept as they came in
styling 1 × <style> — "s1", the colour and weight a paragraph points at by name
layout 1 × <region> — "bottom", the origin and extent a paragraph points at by name
resolved the head is kept as it was written and is not applied here — a paragraph's style="s1" region="bottom" stays an attribute, not a colour or a screen positionThe right-hand side is not a converted file — it is what this site reads out of the left-hand side, and what every conversion of that file starts from.
An awkward TTML file, and what is still read out of it
File
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling">
<body>
<div begin="00:00:01.000" end="00:00:05.000">
<p>Inherits its timing from the div, which we do not resolve.</p>
<p begin="00:00:06.000" end="00:00:07.000">This one has its own timing.</p>
</div>
<!-- <p begin="00:00:08.000" end="00:00:09.000">commented out</p> -->
<div>
<p begin="00:00:10.000"/>
<p begin="00:00:11.000" end="00:00:12.000">Last one.</p>
</div>
</body>
</tt>
What it holds
3 cues, 2 lines of text
00:00:06.000 → 00:00:07.000
This one has its own timing.
00:00:10.000 → 00:00:12.000
(no text)
00:00:11.000 → 00:00:12.000
Last one.
Outside the cues:
prolog an XML declaration and the namespace bindings, kept as they came in
head none — no <styling> and no <layout>, and no paragraph points at one either
comments the commented-out <p> stays a comment, in the place it was written
divs the timings on an enclosing <div> are not pushed down onto the paragraphs inside it
Reported while reading — repaired or skipped, never silently:
1 × paragraphs with no readable begin time of their own (they were skipped — see the note about timing inherited from an enclosing div)
1 × paragraphs with neither an end time nor a duration of their own (their end times were generated)Real files arrive with a byte-order mark, Windows line endings, a stray line before a timecode, or a timecode that cannot be read at all. None of it throws: whatever cannot be understood is reported rather than dropped in silence.
Convert TTML (Timed Text) to another format
Each of these runs entirely in your browser. The labels say what that direction costs before you open it.
- Precision
- Format-specific content
- Styling
- Positioning
- Format-specific content
- Format-specific content
- Timing
- Styling
- Positioning
- Precision
- Format-specific content
- Styling
- Positioning
- Frame rate
- Format-specific content
- Styling
- Positioning
- Format-specific content
- Styling
- Format-specific content
- Styling
- Positioning
- Format-specific content
- Precision
- Format-specific content
- Timing
- Styling
- Positioning
- Line breaks
- Format-specific content
- Styling
- Positioning
- Format-specific content
Converting into this format
- SubRip (SRT) → TTML (Timed Text)
- WebVTT (VTT) → TTML (Timed Text)
- Advanced SubStation Alpha (ASS) → TTML (Timed Text)
- SubStation Alpha (SSA) → TTML (Timed Text)
- YouTube SBV → TTML (Timed Text)
- SAMI (SMI) → TTML (Timed Text)
- LRC Lyrics → TTML (Timed Text)
- MicroDVD → TTML (Timed Text)
- SubtitleMatrix JSON → TTML (Timed Text)
- Plain Text (TXT) → TTML (Timed Text)
- CSV Spreadsheet → TTML (Timed Text)
TTML (Timed Text) is one of the subtitle formats this site handles, and this page is its reference: what it can store, what it cannot, and a page for every format you can convert it to.
The table above is the whole of it — there is no hidden feature list. When a row says no, that is exactly what is lost by converting into TTML, and each conversion page linked below says so before you open a file.
Every one of those conversions runs in your browser. Nothing is uploaded and no account is needed, which matters for material under an NDA, a patient record or a broadcast embargo.
Frequently asked questions
What is a TTML file?
`.ttml` is TTML, the timed-text format the broadcast and streaming world writes captions in: an XML document whose `<head>` declares named styles and regions, and whose `<p>` elements are the subtitles. Streaming caption pipelines speak it, and the SMPTE-TT and IMSC profiles are built on it.
Does TTML store styling?
Yes, and more than the others do: a style table of fonts, sizes, colours, outlines and margins, plus per-cue codes inside the text, so one line can be bold, coloured and placed without any named style. It does not store karaoke timing: a TTML file records when a cue starts and ends, not when a syllable lights up. Here those two tables are the `<head>`: `<styling>` holds named styles (`tts:color`, `tts:fontWeight`, `tts:fontFamily`) and `<layout>` holds named regions (`tts:origin`, `tts:extent`), and a `<p>` points at them by name (`style="s1" region="bottom"`) rather than restating them.
Does every TTML cue store both a start and an end?
Yes, and a moment in a TTML file reads `00:00:04.126`. That is as fine as TTML goes — to the millisecond — and the number is exact, so a cue can be short, long, or overlap the next one without anything being implied.
Which format should I convert TTML to?
Nothing on this site takes everything a TTML file holds, so there is no free direction — each conversion page names its own list of losses. Pick the target by which of those lists you can live with, not by which format you have seen most often.
What does a TTML file keep outside its cues?
The XML declaration and the whole `<head>`: a `<styling>` table of named styles (`tts:color`, `tts:fontWeight`), a `<layout>` table of named regions (`tts:origin`, `tts:extent`) and any `<metadata>`. Each `<p>` refers to them by name rather than restating them, so a file can restyle every caption by editing one entry. Those references sit on the paragraph rather than in the cue model, which is why converting into a format without them reports a loss.