How to Clean a TMX Translation Memory (Free Tool)

Remove duplicates, empty and broken units, extra spaces and conflicting translations from a TMX file, step by step, and review every change first.

To clean a translation memory, export it as TMX, remove what makes it worse (duplicates, empty or broken units, stray spaces, conflicting translations) and import the clean file back. The quickest way is the free TM cleaner: drop the TMX, pick what to remove or fix, review every change and download a clean TMX. It runs in your browser, so the memory is never uploaded.

A memory that has grown for years collects junk: the same unit saved ten times, segments with only a tag, half-translated units, machine translation nobody reviewed. Your CAT tool then offers conflicting matches and slower lookups. Cleaning fixes that without touching the good units.

What you need

How to clean a TMX file, step by step

  1. Open the TM cleaner and drop your TMX. It reads every language in the file.
  2. Look at "What to clean". Each check shows how many units it found: duplicates, empty, tags only, extra spaces, untranslated (target identical to source), tag mismatch, single character, numbers only, punctuation only, length mismatch (one side more than three times longer), URLs, emails and paths, and old units.
  3. For each check, choose whether to remove or fix the units, and open Review to see them. Extra spaces are fixed, not removed, and tags are never touched.
  4. For duplicates, choose which copy to keep: the first one, the last one or the most recent. For old units, choose the age (older than a number of years).
  5. Resolve conflicting translations. Where the same source was translated in more than one way, review and choose one translation per source, keep the most recent everywhere you haven't chosen, or leave them as they are.
  6. Optionally, remove by who, when or where: units created or last changed by certain users, changed before or after a date, with certain property values such as client or project, units that look machine-translated, or text matching a regular expression.
  7. Check the result. The summary says how many units and single translations will be removed and how many segments will be fixed, and the before-and-after list lets you keep any unit, revert an edit or restore a deleted unit.
  8. Click Download TMX. You can also download a change report as CSV.

What stays untouched

Only what you chose changes. The header, attributes, properties and dates are kept byte for byte, with the same encoding as the original, so Trados or memoQ imports the clean file without surprises. In a multilingual TMX every language is checked against the source, and a bad translation can be removed from one language without touching the others.

If you also want to fix individual segments by hand, open the same file in the TMX editor: it shows tags as numbered chips like memoQ, so you can edit the text without breaking them.

Duplicates, variants and other things that aren't the same

Duplicates are units with the same source and the same translation. They add nothing, so removing them is safe.

Inconsistent translations are the same source with different translations. Sometimes one is wrong; sometimes both are right in different contexts. The cleaner asks you to choose instead of deciding for you.

The same translation for different sources ("OK" and "Okay" both translated as "Vale") is often fine. The cleaner lists these for review only and never removes them.

Untranslated units have a target identical to the source. Product names and codes are legitimately the same in both languages, so review this list before removing it.

Other ways to clean a translation memory

Inside your CAT tool. Trados, memoQ and most other CAT tools let you open a translation memory, search or filter its units and delete them by hand. That works for a few bad units; for thousands of duplicates it is slow. What each tool can do in bulk depends on the tool and version, so check its help.

Olifant. The free TMX editor from the Okapi project can flag entries with a duplicate source and target and then delete the flagged entries, and it supports regular-expression search and replace.

Maxprograms TMXEditor. A desktop editor for Windows, macOS and Linux whose feature list includes removing duplicates, removing untranslated units, removing inline tags, trimming leading and trailing spaces, validating TMX against the specification and removing invalid XML characters. It needs a subscription after a free trial.

A text editor. TMX is XML, so small fixes are possible by hand, but it is easy to break the structure, and you can't see duplicates across thousands of units.

For which tools read which formats, see the CAT tools comparison.

Common problems

"The file isn't valid XML". The cleaner reports the line number where the XML breaks. It can't repair a file that isn't valid XML: open it in a text editor at that line, or export the TMX again from your CAT tool. A file cut off during an export or email is a common cause.

Language codes don't match. A TMX can say en-US in one unit and en in another. Different codes are treated as different languages (capitalization doesn't matter, so en-US and en-us are the same), so check the codes in your file before you clean.

A unit has two translations into the same language. The cleaner checks only the first and keeps both in the file, and it tells you how many units are affected.

HTML entities or tags written as text. Memories built from HTML imported as plain text can contain codes like ’ or & or markup like a paragraph tag as words. The cleaner can turn entities into the real character and either trim such markup at the edges of a segment or convert it into real tags.

XLIFF instead of TMX. If you drop an XLIFF, SDLXLIFF or MQXLIFF, the cleaner builds a TMX memory from its segments and you download a clean TMX. The XLIFF itself isn't changed, because removing units from a project file would break it in your CAT tool.

Frequently asked questions

How do I remove duplicates from a TMX file?

Drop the TMX in the TM cleaner, set Duplicates to remove, choose whether to keep the first, last or most recent copy, and download. Duplicates are units with the same source and the same translation.

Will Trados or memoQ still import the cleaned file?

Yes. The cleaner only cuts the units you removed and the spaces you fixed. Everything else, including the header, attributes, properties and dates, is kept byte for byte.

Can I remove one translator's units or machine translation?

Yes. Filter by the user who created or changed the unit, by date, by properties such as client or project, or by units whose user, tool or properties name an MT engine. Review the list before removing.

Can it fix a broken TMX?

It fixes broken units: empty ones, tag-only ones, tag mismatches and extra spaces. If the file itself isn't valid XML, it tells you the line where the problem is so you can fix it or export again.

Is the TM cleaner free, and is my memory uploaded?

It is free with no sign-up, and it runs in your browser, so the memory never reaches TraduQ's server. That matters for memories covered by an NDA.

Should I clean before or after merging memories?

Either works. Merging with duplicate removal already drops exact copies; cleaning afterwards catches the rest. See how to merge TMX files.

TraduQ is a marketplace where clients find translators, and its file tools are free and run in your browser, so your files never leave your computer. Before delivering a job, you can also QA check your XLIFF files.

Tools for this

  • TM cleaner — Find and remove duplicates, empty and broken segments in a TMX.
  • TMX editor — Edit target segments with memoQ-style tags, delete units and save a TMX.

Related posts