TTML Subtitle Viewer
View TTML subtitle files online and inspect timed text, captions, timestamps, and subtitle structure directly in your browser.
Updated
What is the TTML Subtitle Viewer?
The TTML Subtitle Viewer opens TTML/XML subtitle files in your browser and displays parsed cue text, timing, and selected styling information. Files with .ttml, .dfxp, or .xml extensions can be loaded, but the viewer does not validate conformance to every TTML profile.
TTML is an XML-based standard developed by the W3C for video subtitles, closed captions, and timed metadata. Because TTML relies on nested XML tags and complex timecode syntax rather than plain sequential text, opening a .ttml or .xml subtitle file in a basic text editor can make it difficult to review dialogue, check timestamps, or inspect styling information.
The viewer presents recognized subtitle elements in a readable timeline so you can review dialogue and timing without reading the raw XML.
Key Capabilities
- Instant Local Opening: Load
.ttml,.dfxp, or.xmlfiles instantly without uploading your files to remote servers. - Formatted Subtitle Timeline: View all dialogue entries sequentially alongside precise start times, end times, and duration calculations.
- XML Structure Tree: Inspect raw TTML metadata, head regions, styling specifications, and paragraph hierarchy in a structured code view.
- Search and Filter: Locate specific subtitle lines, speaker cues, or timecodes instantly within large caption tracks.
- Common TTML elements: Displays recognized timing, text, styling, and region information; unsupported profile-specific features may not be represented.
- Plain Text Extraction: Convert and copy timed dialogue blocks into clear text summaries for script reviewing or proofreading.
Common Use Cases
- Subtitle review: Inspect cue text and timing before using a separate standards-compliance or playback tool to validate delivery requirements.
- Subtitle Debugging: Identify broken XML nodes, missing
beginorendattributes, or invalid timecode formats that prevent captions from rendering in media players. - Localization & Translation Review: Read through translated subtitle tracks line by line without running heavy video editing software (NLEs).
- Caption Extraction: Extract clean dialogue text from XML caption archives for documentation, accessibility transcripts, or editorial logs.
How it works
The TTML Subtitle Viewer processes subtitle XML locally in your browser. It extracts supported elements for display, but it is not a full XML or TTML profile validator.
Step-by-Step Instructions
- Supply your TTML File or Source Markup
- Click Browse File to select a
.ttml,.dfxp, or.xmlfile from your device, or drag and drop your file into the upload zone. - Alternatively, paste raw TTML XML code directly into the input area.
- Parsing
- The tool reads the XML-like structure and extracts recognized
<head>,<body>,<div>,<p>, and<span>information. It does not check every document against the TTML specification.
- Explore the Parsed Subtitle Output
- Timeline View: Review recognized caption items with parsed
begin,end, and calculateddurationvalues. Unsupported timing expressions or profile features may not be interpreted as intended. - Styling View: Inspect inline or head-defined attributes such as font color, alignment, origin coordinates, and region IDs.
- Raw Code View: Inspect the formatted, syntax-highlighted XML source for structural debugging.
- Copy or Export
- Copy extracted subtitle lines as plain text, or filter specific time ranges as needed.
Technical Processing Mechanics
1. Reading the document structure
When a file is loaded, the parser reads the <head> and <body> structures:
- Head Metadata: Extracts region positions (
<region>), color definitions (<style>), and frame rate settings (tts:frameRate,tts:tickRate). - Body Hierarchy: Traverses
<div>,<p>, and inline<span>elements to collect text strings, speaker labels, and timing markers.
2. Timecode Standardization
TTML supports multiple time expression formats:
- Clock Timecode:
HH:MM:SS.mmm(e.g.,00:01:15.500) orHH:MM:SS:FF(frames). - Metric Time:
75.5sor4500ms. - Tick Time:
1200tevaluated against the document tick rate.
The viewer converts recognized time expressions into seconds and human-readable clock formats. Check frame rates and other document timing settings carefully; a displayed time is not a substitute for validating a delivery file in its target player.
3. Client-Side Security & Privacy
All file parsing, string decoding, and UI rendering happen locally inside your browser session using JavaScript. No subtitle content or media files are transmitted across the internet.
Examples
Basic TTML Subtitle File
A standard Timed Text Markup Language document containing timed paragraph elements.
<tt xmlns="http://www.w3.org/ns/ttml">
<body>
<div>
<p begin="00:00:01.500" end="00:00:04.000">Hello and welcome to the video stream!</p>
<p begin="00:00:04.500" end="00:00:07.200">This subtitle track is encoded using TTML XML formatting.</p>
</div>
</body>
</tt>Timecode: 00:00:01.500 --> 00:00:04.000
Text: Hello and welcome to the video stream!
Timecode: 00:00:04.500 --> 00:00:07.200
Text: This subtitle track is encoded using TTML XML formatting.TTML with Styling and Colors
Timed caption block using TTML inline styling attributes for text presentation.
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling">
<body>
<div>
<p begin="00:00:10.000" end="00:00:13.500" tts:color="yellow" tts:textAlign="center">[Narrator] Welcome back to the episode.</p>
</div>
</body>
</tt>Timecode: 00:00:10.000 --> 00:00:13.500
Styling: Color #FFFF00 (Yellow), Align Center
Text: [Narrator] Welcome back to the episode.Frequently asked questions
How do I open and view a TTML file?
How do I open and view a TTML file?
Drag and drop a .ttml, .dfxp, or .xml file, choose it with the file picker, or paste its contents. The viewer displays the cue elements and timing information it recognizes. It is not a complete XML or TTML conformance validator.
What is a TTML file?
What is a TTML file?
TTML stands for Timed Text Markup Language. It is an XML-based file format developed by the World Wide Web Consortium (W3C) to handle subtitles, closed captions, and timed metadata across television broadcasts, streaming services, and web video. TTML files contain timed text elements (<p> tags) along with timing attributes (begin and end), styling controls, and positioning instructions.
Are TTML and DFXP files the same format?
Are TTML and DFXP files the same format?
DFXP is a name associated with an earlier TTML profile and is still used as a file extension. A .dfxp file may contain TTML-family XML, but the extension alone does not guarantee that it uses the same profile or features as another TTML file.
How does TTML differ from SRT and WebVTT subtitle formats?
How does TTML differ from SRT and WebVTT subtitle formats?
SRT and WebVTT are text-based subtitle formats, while TTML uses XML and can represent styling, regions, and different timing expressions. This viewer displays only the TTML elements and timing forms it recognizes; it may not preserve or interpret every profile-specific feature.
Can I view TTML files that use frame-based timestamps or tick rates?
Can I view TTML files that use frame-based timestamps or tick rates?
The parser recognizes clock times, metric offsets, frame-based values, and tick-based values. Results depend on the timing attributes the parser recognizes; check the frame rate and tick rate and verify output in a TTML-aware player before relying on it for delivery.
Are my TTML subtitle files uploaded or stored on a server?
Are my TTML subtitle files uploaded or stored on a server?
No. The entire parsing process is performed entirely on the client side inside your web browser. Your subtitle files, text data, and metadata are never uploaded, saved, or transmitted to any remote server, ensuring complete privacy and security for confidential video productions.
Related tools
More utilities you might find handy.
Audio Metadata Viewer - ID3 Tag & Audio File Info Reader
View ID3 tags, cover art and technical info from MP3, FLAC, M4A, WAV, OGG and Opus files instantly in your browser
Audio Trimmer
Trim and export a section of an audio file
Audio Waveform Generator
Generate a visual waveform from an audio file