Skip to content
migration.tools
Messy CSV to Clean CSV

CSV cleaner and deduplicator

Most failed imports are data-quality problems in disguise: a trailing space that breaks a lookup, a duplicate that violates a unique key, a header the target system doesn't recognise. Clean the file before you load it and get a count of everything that changed.

Options
Leave empty to compare whole rows. Separate several columns with commas.

CSV

Clean CSV

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your Messy CSV or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the Clean CSV or download it. Drop several files to convert a batch into one ZIP.

What each fix is for

Trimming removes leading and trailing spaces and collapses runs of spaces — the usual reason two “identical” values don't match. Empty rows, common at the end of spreadsheet exports, are dropped so they don't become blank records.

Duplicates are found either by comparing whole rows or by a key you name, such as an email or ID column. With a key, the first row for each value is kept. Turn on case-insensitive matching to treat Ann@x.com and ann@x.com as the same.

Placeholder values such as NULL, N/A and a lone dash are text as far as a database is concerned. Blanking them lets the import store a real NULL.

Renaming headers to snake_case in one step makes the file match the column names most databases and APIs use.

Questions

Which duplicate is kept?

The first occurrence, in file order. Sort the file first if you need a particular row to win — for example, newest first to keep the most recent record.

Can I clean several files with the same settings?

Yes. Drop them together; each is cleaned with the options you set and they download as a ZIP.

Guides that use this tool