Clean up a CSV file
Trim stray spaces, drop empty and duplicate rows, even up ragged columns and switch semicolons to commas, with a count of every change.
Or paste into the box below.
Your data is cleaned on this device. Nothing is uploaded.
Where the mess comes from
Exports from one system into another. Stray spaces come from fixed-width fields padded out, blank rows from a report's section breaks, duplicates from merging two exports that overlapped and ragged rows from software that stops writing a line at the last filled cell. None of it is visible in a spreadsheet until a lookup fails or a count is wrong.
Why every change is counted
"Cleaned" isn’t an answer you should accept about your own data. If a tool removed four hundred rows you want to know that before you send the file on, because four hundred duplicates is a finding in itself. The report lists each kind of change and how many times it happened.
Semicolons and tabs
The delimiter is detected, so a semicolon or tab separated file is read correctly. By default it is written back with commas, the most widely understood form; turn that off to keep the original separator for someone whose Excel expects semicolons.
Common questions
Will cleaning ever delete my header row?
No. The first row is never treated as a duplicate or as empty, because a CSV that has lost its header is harder to use than the mess it started as. Duplicate detection only compares data rows against each other.
What counts as a duplicate?
An exact match across every column, after trimming if trimming is on. Rows that differ in one cell are kept, because two customers can share a name and a city and still be two people. Fuzzy matching would need a judgement call this tool won’t make for you.
Why are some rows shorter than others?
Usually a trailing empty cell that one program wrote and another didn’t or a row where a field was left off. Evening up short rows pads them with empty cells to the full width, so every row has the same number of columns and a spreadsheet lines them up.
Does it change the values themselves?
Only by trimming spaces from the ends of cells and only when that option is on. Nothing is reformatted, retyped or converted, so a date stays in whatever format it was in and a number keeps its leading zeros.
How do I know what it changed?
Every change is listed by count above the preview: how many cells were trimmed, how many empty or duplicate rows went, how many columns were removed. If the list says nothing needed changing, the file is returned as it was.
Guides
The other tools
All of them work the same way: the file is read in your browser and never uploaded.