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.
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 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.
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.
"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.
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.
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.
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.
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.
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.
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.