File format · .tmx
TMX File Format Guide: Translation Memory eXchange and Repair
The TMX translation memory format explained: structure, why files break, and how much of a damaged export we can usually recover.
TMX, short for Translation Memory eXchange, is the XML-based format the translation industry uses to move translation memories between systems. It was created under LISA, the Localization Industry Standards Association, and it remains the closest thing localization has to a universal memory format. When an export is truncated, malformed, or rejected on import, the segments are usually still present in the file, so recovery is often possible.
What is a TMX file, and which tools use it?
A TMX file stores translated segments so they can be reused across tools and projects. Translators and language service providers use it to migrate memories when they switch CAT tools and to consolidate memories from several systems. It also serves to deliver a finished memory to a client and to back up data held in a cloud translation environment.
Almost every serious translation tool imports and exports it: Trados Studio, memoQ, Wordfast, OmegaT, Déjà Vu, Smartcat, Phrase (formerly Memsource), Across, XTM, and Wordbee. That near-universal support is the whole point of the format.
LISA ceased operations in 2011, and revision 1.4b, published that year, was the final version of the specification. The standard survives because so many products implemented it, and copies of the specification remain freely available through industry bodies and public archives. Treat the published 1.4b document as the authoritative reference.
Key facts at a glance:
- Full name: Translation Memory eXchange
- Extension: .tmx
- Nature: a plain-text XML document, with no binary signature; the file begins with an XML declaration and a
<tmx>root element - Steward: the OSCAR special interest group of LISA
- History: first published in the late 1990s, final revision 1.4b in 2011
- Media type: commonly cited as application/x-tmx, though it is not an IANA-registered type
- Text encoding: XML, with UTF-8 the recommended choice
How is a TMX file structured?
Every TMX file has a <tmx> root containing a <header> and a <body>. The header carries administrative metadata through required attributes such as creationtool, creationtoolversion, segtype (sentence or paragraph), o-tmf, adminlang, srclang, and datatype. The body holds the actual content as a series of translation units.
<tmx version="1.4">
<header creationtool="ExampleTool" creationtoolversion="2.1"
segtype="sentence" o-tmf="plain text"
adminlang="en" srclang="en" datatype="plaintext"/>
<body>
<tu tuid="0001" creationdate="20240115T093000Z">
<tuv xml:lang="en"><seg>Press Start to continue.</seg></tuv>
<tuv xml:lang="de"><seg>Druecken Sie Start, um fortzufahren.</seg></tuv>
</tu>
</body>
</tmx>
Each <tu> element is one translation unit. Inside it, a <tuv> element holds the text for a single language, and the <seg> element inside each tuv holds the segment text itself. A unit can carry more than two languages, although most tools work with bilingual pairs. When a memory is genuinely multilingual, the header declares srclang as *all*.
Units can also carry metadata: creation and change dates in the compact form CCYYMMDDTHHMMSSZ, author and changer identifiers, usage counts, and custom properties. Inline elements such as <ph>, <bpt>, <ept>, <it>, and <hi> stand in for formatting tags and native markup from the original document format.
Related formats in the localization toolchain
TMX sits alongside several other standards from the same ecosystem. XLIFF, maintained by OASIS, carries a bilingual document through an active translation job rather than a reusable memory. TBX exchanges termbases, and SRX exchanges segmentation rules. Proprietary memory databases, such as Trados .sdltm files or a memoQ translation memory, are the native stores that TMX moves data between.
Why do TMX files become corrupt or unreadable?
Most TMX damage falls into a handful of well-understood patterns. Naming the pattern tells you what repair is needed.
- Truncated exports. An export that runs out of disk space, is killed mid-write, or loses its network transfer stops abruptly. The result is unclosed
<tu>or<seg>elements and missing closing tags at the end of the file. - Encoding and character faults. A mismatch between the declared encoding and the actual bytes, or UTF-16 content read as UTF-8, makes a strict parser reject the file. So do control characters copied from source documents, unescaped ampersands, and undefined HTML entities such as
. - Header defects. A malformed header blocks import of the entire file in many tools, even when the body is fully intact.
- Dialect drift. Tools add their own inline markup and attributes, so a file that exports cleanly from one tool can be refused by another because of nonstandard tags or an older version attribute.
- Wrong language codes. Invalid or inconsistent values in
xml:langcause some importers to skip units or abort. - Editor damage. Opening the file in a spreadsheet or a careless text editor and resaving it can restructure quoting, alter line endings, or re-encode the text.
- Container faults. Large memories are often delivered inside a ZIP archive. Damage to the archive can hide perfectly good content, so the repair may need to start at the container rather than the XML.
- Size limits. Multi-gigabyte exports can exceed an importer's limits, so the import stops partway and looks like corruption.
Which data can be recovered from a damaged TMX file?
In most cases, a great deal. The segment text for each language is the core payload, and it survives most structural damage. Everything written before the point of truncation is normally recoverable in full. Metadata such as creation dates, author identifiers, usage counts, and custom properties usually survives alongside the text.
A missing or broken header is not fatal, because the header is administrative rather than content. We rebuild it with valid default values and keep every unit in the body. Even a file that is not well-formed XML can yield its units through tolerant parsing that reads each <tu> block independently.
One limit is worth stating honestly. If text was decoded with the wrong code page and then saved, the garbled characters are baked into the bytes, and no structural repair restores the original words. We can identify this during evaluation.
How does TMX recovery work?
Recovery begins with diagnosis, and each step exists to protect the segments. The sequence we follow is:
- Locate the first error with a strict XML parser. The parser reports an exact position, which beats guessing from a vague import message.
- Fix that error and re-run, iterating until the document parses cleanly. Typical fixes include rebuilding the header, closing truncated elements, dropping an incomplete final unit, normalizing entities, stripping characters XML forbids, and correcting the encoding declaration.
- Validate the language codes. Invalid or inconsistent
xml:langvalues make importers skip units or abort the whole file. - Normalize inline markup to the subset your target tool accepts, and convert the version attribute if the importer demands a specific revision. This step is what lets a file from one CAT tool import cleanly into another.
- Re-validate the whole document, count the recovered units, and spot-check segments on both sides of every repair point. Only then do we return the file or load it into a native memory for you.
Frequently asked questions
Can a TMX file be recovered if the header is missing or invalid?
Yes. The header describes the file but does not contain the translations. We reconstruct it with valid values, such as a sensible source language and segment type, and the body imports normally afterward.
Does TMX support more than two languages?
Yes. A translation unit can hold a <tuv> for each language. In practice, most tools import bilingual pairs, so a multilingual file is usually split into one pair per import.
Which TMX version should I choose when exporting?
Version 1.4, in its final 1.4b revision, has the broadest support. Older files in versions 1.1 through 1.3 still exist, and most current tools read them, but 1.4 is the safest export choice.
Can I open a TMX file in a text editor?
Yes. TMX is plain-text XML, so any text editor can display it. Work on a copy, and avoid resaving from a spreadsheet or an editor that rewrites quoting, line endings, or encoding. Resaves of that kind are a common cause of import failure.
Send us your .tmx file for a free evaluation
Our recovery engineers will tell you exactly what can be recovered — at no cost. There is no charge if we cannot recover your data.
Start a free evaluation