XConvert
Downloads
Pricing

Convert TXT to TTML Online

Turn plain TXT subtitle text into a TTML subtitle file in seconds—right in your browser.

Input (TXT)
Output (TTML)

How to Convert TXT to TTML Online

  1. Upload Your TXT File: Drag and drop or click "+ Add Files" to load a plain-text transcript or timed caption text from your device. Batch is supported — drop several TXT files in one pass. Files never leave your browser session; no upload to a server.
  2. Confirm Output Format (TTML): TTML is preselected as the output. The converter parses your TXT, detects any timecodes (HH:MM:SS,mmm or HH:MM:SS.mmm patterns), and wraps each cue as a <p> element inside a valid <tt> XML document with xmlns="http://www.w3.org/ns/ttml" and an xml:lang attribute so the file passes W3C TTML1 schema checks.
  3. Review the Source TXT (Optional): If your TXT is an untimed transcript (one paragraph per line, no timecodes), the converter assigns sequential default cue durations so each line becomes a <p> with begin/end attributes — you can then re-time inside your subtitling editor. If your TXT already has SRT-style timing blocks, those timecodes carry through verbatim.
  4. Convert and Download: Click "Convert" and download the resulting .ttml file. No sign-up, no watermark, no email gate. The XML opens directly in Subtitle Edit, EZTitles, Final Cut Pro X, Adobe Premiere, or any IMSC-aware player.

Why Convert TXT to TTML?

TXT is a universal container — anything from a typed transcript to an exported caption file can land in .txt form — but it carries no styling, no XML schema, and no guaranteed timing. TTML (Timed Text Markup Language) is the W3C-standardized XML format that broadcasters, OTT platforms, and accessibility regulators expect for captions and subtitles. Converting TXT to TTML turns a free-form transcript into a structured, validatable, distribution-ready caption file.

  • Netflix and broadcast delivery — Netflix explicitly prefers TTML for non-live timed-text delivery and requires schema-valid XML with xml:lang on the root <tt> element and percentage-based positioning. A TXT transcript from a transcription vendor becomes ingestable only after TTML wrapping.
  • IMSC-based streaming pipelines — IMSC 1.1, a TTML profile published by W3C and adopted by DVB, ATSC, HbbTV, and MPEG CMAF, is the modern interchange format for OTT subtitles. Anything you upload as TXT to a streaming workflow has to be converted to a TTML/IMSC document first.
  • HbbTV and DVB broadcast (EBU-TT-D) — European broadcasters (BBC, Freeview Play, DVB-T2 services) deliver subtitles as EBU-TT-D, a strict TTML1 profile defined in EBU Tech 3380. The base XML structure is identical to plain TTML, so a TXT-to-TTML pass is the first step before profile-specific edits.
  • Accessibility compliance — FCC closed-captioning rules in the US (CFR Title 47, Part 79) reference SMPTE-TT, a TTML superset, as a safe-harbor interchange format. Plain TXT transcripts do not satisfy these rules; a TTML file with proper timing does.
  • Subtitle editor round-trips — Subtitle Edit, Aegisub (via plugins), EZTitles, and CaptionMaker import TTML cleanly and can re-export to SRT, VTT, SCC, STL, or back to TTML. TXT is a dead-end input for most of these tools.
  • CMAF and DASH packaging — MPEG-DASH and HLS-CMAF packagers (Bento4, Shaka Packager, AWS MediaConvert) accept TTML/IMSC as a sidecar input but reject untyped TXT. Converting first unblocks the packaging step.

TXT vs TTML — Format Comparison

Property TXT TTML
File type Plain UTF-8 / ASCII / UTF-16 text XML document (.ttml or .xml)
Structure Free-form lines, optional blank-line separators <tt> root → <head> (styling, layout) + <body> → <div> → <p> cues
Timing None, or ad-hoc inline timestamps Required begin / end (or dur) attributes on every <p> cue, in clock-time or SMPTE timecode
Styling None CSS-like properties via tts: namespace — fontSize, color, backgroundColor, textAlign, displayAlign
Positioning None tts:origin / tts:extent regions defined in <layout>, applied per-cue or per-region
Language tag None xml:lang required on root <tt> element
Validation No schema Validates against W3C TTML1 / TTML2 / IMSC schemas
Where it's used Source transcripts, untyped exports Netflix, BBC iPlayer, Disney+, Prime Video, DVB broadcast, HbbTV, IMF masters
Bytes per cue ~30–60 (text only) ~100–200 (text + XML tags + timing attributes)
Standards body None W3C Timed Text Working Group

TTML Profile Cheat Sheet — Which Variant Do You Need?

Profile Defined by Used by Key constraints vs base TTML
TTML1 (base) W3C TTML1 Recommendation Generic interchange, archival Full feature set; permissive
TTML2 W3C TTML2 Recommendation (2018) Newer authoring tools, ruby text, vertical text Adds ruby, IPA, audio, animation
IMSC 1.1 Text Profile W3C IMSC 1.1 (2018) Netflix, OTT delivery, IMF Media-time only (no SMPTE); restricted styling subset
IMSC 1.1 Image Profile W3C IMSC 1.1 OTT with bitmap captions Uses PNG image cues instead of text
EBU-TT-D EBU Tech 3380 BBC, DVB, HbbTV, Freeview Play Profile of TTML1; strict region/styling subset for distribution
SMPTE-TT SMPTE ST 2052-1 FCC safe-harbor interchange (US) TTML1 superset; allows SMPTE timecode and image captions
DFXP Earlier W3C draft (deprecated name for TTML1) Legacy Flash, older captioning tools Functionally TTML1; just an older filename convention

The base XML structure is the same across all profiles, so a TTML output from this converter is a valid starting point. Profile-specific tightening (removing pixel values for Netflix, switching to media-time for IMSC, applying EBU-TT-D regions) is a downstream edit in a subtitle editor.

Frequently Asked Questions

Will my TXT file produce a TTML that Netflix will accept?

Not automatically. Netflix's TTML delivery spec demands percentage-only positioning, no pixel values, xml:lang on the root <tt> element, and either SMPTE timecode with ttp:timeBase="smpte" and a frame-rate declaration, or media-time. This converter produces a schema-valid TTML1 document that opens in Netflix-compatible tools (EZTitles, Subtitle Edit, MacCaption), but you'll still need to adjust styling, regions, and time base inside one of those tools before submitting for QC. Treat the output as a clean foundation, not a finished deliverable.

What happens to my TXT file if it has no timecodes?

If the converter detects no timing patterns (no HH:MM:SS,mmm, HH:MM:SS.mmm, or SMPTE HH:MM:SS:FF markers), each non-empty line becomes one <p> cue with a default sequential duration (commonly 2–3 seconds per cue). The cues are valid XML and visible in any TTML player, but the timing is placeholder — you must re-time inside a subtitling editor (Subtitle Edit, Aegisub, EZTitles) against the actual audio.

Why does my TTML output look so much larger than the TXT input?

XML overhead. Every cue is wrapped in <p begin="..." end="...">...</p>, the file carries a <head> with namespace declarations and optional styling, and TTML profiles often include a <layout> block with region definitions. A 5 KB TXT transcript routinely produces a 15–25 KB TTML file, which is normal and expected. The size grows with the number of cues, not the length of any individual cue's text.

Can I edit the resulting TTML by hand to add colors, positions, or italics?

Yes — TTML is just XML and opens in any text editor. To italicize a word, wrap it in <span tts:fontStyle="italic">word</span>. To color a speaker's lines, add a <style xml:id="red" tts:color="red"/> to <head> and reference it with style="red" on the <p>. To reposition, define regions in <layout> with tts:origin and tts:extent (percentages, not pixels, if you're targeting Netflix). For complex styling, doing it in Subtitle Edit or EZTitles is faster and less error-prone than hand-editing XML.

What's the difference between TTML and DFXP?

DFXP (Distribution Format Exchange Profile) was the working name used during the W3C drafting process; once TTML1 became a Recommendation in 2010, DFXP was effectively renamed TTML. Files with a .dfxp extension and files with a .ttml extension are the same XML format — both validate against the W3C TTML1 schema. Some legacy Flash-era captioning tools still produce .dfxp filenames; you can rename the extension to .ttml with no other changes.

Will the conversion handle SRT-style timing inside a TXT file?

Yes. If your TXT was exported with SRT-like blocks — a cue number, an HH:MM:SS,mmm --> HH:MM:SS,mmm line, then one or more text lines, separated by a blank line — the converter parses each block as a cue, converts the comma decimal separator to a period (TTML uses HH:MM:SS.mmm), and writes each as a <p begin="..." end="..."> element. Speaker labels like >> NAME: and HTML-style <i> tags carry through to the <p> text content; full italics styling requires a post-conversion edit to wrap them in <span tts:fontStyle="italic">.

Why won't my TTML file validate against the W3C schema?

The most common causes, in order: missing xml:lang attribute on <tt> (required by IMSC and Netflix); unescaped ampersands or angle brackets inside cue text (use &amp;, &lt;, &gt;); a mismatched or unclosed tag from a hand edit; using pixel values where the profile expects percentages; or declaring ttp:timeBase="smpte" without a corresponding ttp:frameRate. Run the output through a TTML validator (the W3C IMSC validator at sandflow.github.io, or the imscJS library) to see line-numbered errors.

Can players like VLC or browsers display TTML directly?

VLC plays TTML sidecar files with most video formats since version 3.0 (released February 2018), and Safari supports TTML in HLS streams. Chrome, Firefox, and Edge do not natively play standalone TTML files in an HTML5 <video> <track> element — those expect WebVTT. For broad in-browser playback, convert the TTML to VTT after authoring. TTML's role is upstream of the player: it's an interchange and distribution format, not a browser-native one.

Does the converter strip BOM or fix encoding issues from the source TXT?

Yes. The converter reads the TXT as UTF-8, strips a leading UTF-8 BOM (EF BB BF) if present, and writes the output as UTF-8 with an explicit <?xml version="1.0" encoding="UTF-8"?> declaration. If your TXT is in another encoding (Windows-1252, Shift-JIS, UTF-16), open it in a text editor and re-save as UTF-8 before uploading — TTML is XML and must declare its encoding accurately or downstream parsers will reject it.

Is anything uploaded to your servers?

No. The TXT-to-TTML conversion runs entirely in your browser session — the parser, XML serializer, and download are all client-side JavaScript. The file never reaches a server and there's no account, watermark, or file-count cap.

Related Convert tools
TXT ConverterConvert Txt To SrtConvert Txt To VttConvert Txt To AssConvert Txt To SsaConvert Srt To TtmlConvert Vtt To TtmlConvert Ass To Ttml

Image Tools

Image CompressorCompress JPEGCompress PNGCompress GIFCompress WebPImage ConverterJPG ConverterImage Resizer

Video Tools

Video CompressorCompress MP4MP4 to GIFVideo to GIFVideo ConverterMP4 ConverterVideo Cutter

Audio Tools

Audio CompressorCompress MP3Compress WAVAudio ConverterMP3 ConverterFLAC to MP3Audio Cutter

Document Tools

Compress PDFMerge Images to PDFSplit PDFPDF to JPGUnzip FilesRAR Extractor

Converters

Time Zone ConverterMeeting PlannerIST to ESTTime Zone AbbreviationsUnit ConverterLength ConverterFlow Rate Converter
© 2026 XConvert.com. All Rights Reserved.
About UsPrivacy PolicyTerms of ServiceContactHelp Us Grow