What is a TMX file?
Updated · 6 min read · by the TM Cleaner team at terratra
A TMX file is a translation memory saved in TMX (Translation Memory eXchange), the open XML format that CAT tools use to move a translation memory from one tool to another. This guide shows what is inside one, how to open it, why some TMX files won't import, and how to clean one that has collected years of duplicates and junk.
What a translation memory is
A translation memory (TM) is a database of sentences you have translated before, each stored with its translation. Every pair is a translation unit. When a new text contains the same or a similar sentence, your CAT tool finds it in the TM and offers the earlier translation: an exact (100%) match, or a fuzzy match that you edit.
That reuse is why a TM is worth keeping. It saves typing, it keeps terminology and style consistent across translators and years, and a CAT tool's analysis counts how much of a new job the TM already covers, which is what many agencies base their prices on.
Inside a CAT tool, a TM is stored in that tool's own format: Trados Studio keeps it in an .sdltm file, other tools in a database or on a server. To move a TM to another tool, or to hand it to a client, you export it as TMX. OmegaT is the exception: it keeps its project memory as a TMX file to begin with.
What TMX is
TMX stands for Translation Memory eXchange. It is an open standard, published by LISA (the Localization Industry Standards Association) so that translation memories could move between tools without losing content. Nearly every tool today writes version 1.4 (strictly 1.4b). Some older exports still say version 1.1, which names the languages with a slightly different attribute.
A .tmx file is plain text: XML, usually encoded as UTF-8. That makes it readable in any text editor. It also makes it verbose, because every unit repeats its dates, user names and language codes, so a large TM easily runs to hundreds of megabytes.
What's inside a TMX file
Here is a TMX file with one translation unit:
<?xml version="1.0" encoding="UTF-8"?>
<tmx version="1.4">
<header creationtool="ExampleCAT" creationtoolversion="1.0"
segtype="sentence" o-tmf="ExampleCAT" adminlang="en-US"
srclang="en-US" datatype="plaintext"/>
<body>
<tu tuid="1042" creationdate="20250314T091502Z" creationid="ANNA"
changedate="20260208T150010Z" changeid="MARK" usagecount="7">
<prop type="x-Client">Acme</prop>
<tuv xml:lang="en-US">
<seg>Click <bpt i="1"><b></bpt>Save<ept i="1"></b></ept> to keep your changes.</seg>
</tuv>
<tuv xml:lang="de-DE">
<seg>Klicken Sie auf <bpt i="1"><b></bpt>Speichern<ept i="1"></b></ept>, um Ihre Änderungen zu behalten.</seg>
</tuv>
</tu>
</body>
</tmx>- The header says which tool wrote the file and what the source language is (
srclang). A multilingual TM may saysrclang="*all*"instead, which some tools, Trados Studio among them, refuse to import. - A translation unit,
<tu>, is one entry in the TM. Its attributes record when it was created and last changed (creationdate,changedate, in UTC), by whom (creationid,changeid: a user name, or sometimes the name of a machine translation engine) and how often it was used (usagecount). - Properties and notes,
<prop>and<note>, hold custom fields such as the client, project or domain, and comments. Property types that start withx-are specific to the tool that wrote them. - A variant,
<tuv>, holds the text in one language, named byxml:lang(TMX 1.1 usedlang). A unit usually has two, a source and a target, but a multilingual TM can keep several languages in one unit. - The segment,
<seg>, is the text itself. Formatting appears as inline tags:<bpt>and<ept>open and close a pair (bold, a link),<ph>is a standalone placeholder such as a line break or a variable, and<it>is a tag whose partner lies outside the segment. Their content is the original markup, escaped.
Cleaning tools rely on this metadata. TM Cleaner, for example, keeps the most recently changed translation of a duplicate by default (the changedate), and finds machine-translated units by their creation and change IDs.
How to open a TMX file
- In a text or XML editor. Any editor opens it, because it is plain text. That is fine for a look at a few units, but editors struggle with files of hundreds of megabytes, and one careless edit (a stray
&or<) makes the whole file invalid for CAT tools. - In a CAT tool. Create a new, empty TM with the same languages and import the TMX into it. You can then search it and edit units in the tool's TM editor.
- In Excel. Excel can't show a TMX as a table of sources and targets, because the file is nested XML. Convert it first: TMX to Excel gives you one row per unit with source, target, translator and date.
- In TM Cleaner's preview. Upload the file to see its languages, how many units it holds, its duplicate groups and its junk, before anything changes. The demo shows the same preview on a sample file.
Why TMX files get dirty
A translation memory only grows. Every project, alignment and pre-translation run adds units, and almost nothing takes them out. After a few years most TMs hold:
- Duplicates: the same source with several translations, or the very same pair many times over.
- Junk: units that are only a URL, a number, a tag or a file path.
- Machine translation: raw output from pre-translation, stored exactly like human work.
- Broken units: empty targets, targets that copy the source, tags that open and never close, and encoding damage (é stored as é).
- Language codes that disagree: en, en-US and EN-us in one file.
Which of these to remove, and which to keep, is the subject of our guide to cleaning a translation memory.
Why a TMX file won't import
CAT tools read TMX strictly, so one error can stop the whole import, or units go missing without a message. The usual causes:
- A character XML doesn't allow, such as a control character pasted from a PDF or a database.
- A bare
&, or an HTML entity such as , which XML doesn't know. - The wrong encoding: the file says UTF-8 but holds Windows-1252 bytes.
- A file cut off by an export or a download that didn't finish.
- A header with
srclang="*all*", or language codes that don't match the TM you import into: memoQ and Phrase match locales strictly, so en-US is not en. - Inline tags that open and never close.
TM Cleaner repairs the first four as you upload the file and reports what it repaired. Its import check shows the language codes as written and can fix them in the cleaned file, and a rule can drop units whose tags don't pair up. More on fixing a TMX that won't import.
How to clean a TMX file
- Export the TM as TMX from your CAT tool, or take the TMX file you were sent.
- Upload it to TM Cleaner. It shows every duplicate group and every junk category before anything changes.
- Adjust the rules: pick a preset, switch rules off, or choose a different winner for any duplicate group.
- Clean and download the cleaned TMX, with removed.tmx and removed.csv listing every unit that was cut and why.
- Import the cleaned TMX into a new TM in your CAT tool.
It is free. Files up to 50 MB need no account, and signing in with an emailed link raises the limit to 2 GB. Several TMX files, or a .zip of them, become one TM with duplicates removed across all of them.
Questions
Is a TMX file the same as a translation memory?+
A TMX file is one way to store a translation memory: the exchange format. Inside a CAT tool the same TM usually lives in the tool's own format (an .sdltm file in Trados Studio, for example) or on a server, and it becomes a TMX file when you export it.
How do I convert a TMX file to Excel?+
Upload it to TM Cleaner and choose “TMX → Excel”. You get cleaned.xlsx with one row per unit (source, target, translator and date) and nothing removed. It works the other way too: a bilingual .xlsx or .csv becomes a TMX.
What is the difference between TMX and XLIFF?+
XLIFF is a bilingual file for one job: the document you are translating, segment by segment. TMX is the memory you build up across jobs. You can turn finished XLIFF files into a TMX with xliff.ai's free XLIFF to TMX converter, and clean the result here.
Can I edit a TMX file by hand?+
Yes, it is text. Keep a copy first, save as UTF-8, and write & as & and < as < inside segment text, or the file stops being valid XML. For more than a few edits, import it into a CAT tool and use its TM editor instead.
Is every .tmx file a translation memory?+
No. Tiled, a level editor for games, also saves its maps as .tmx. If the file starts with <map> rather than <tmx>, it is a game map, not a translation memory.
Clean your translation memory now
Upload a TMX, preview every change, download the cleaned TM. Free, and no account needed up to 50 MB.
━━ more guides
- How to clean a translation memoryTranslation memory cleanup in five steps: export the TM as TMX, decide what to remove, clean and preview, check the result, and re-import it without losing good matches.
- Translation memory software: what it does and how to chooseWhat translation memory software does, the main desktop and cloud tools, what to check before choosing one, and where a TM cleaner fits next to them.