CSV Cleaner

Trim cells, drop blank rows, remove duplicates, tidy any messy export.

Paste a messy CSV and get a clean one back: trimmed cells, blank rows gone, duplicate rows removed, and fully empty columns dropped if you ask for it. Parsing follows RFC 4180, the CSV standard: quoted fields may hold commas and line breaks, and a doubled quote inside a quoted field means one real quote. Nothing is uploaded: the file never leaves your device.

Honest limits. Cleaning is mechanical: it fixes spacing, blanks and exact duplicates, but it cannot fix a misspelled name, a wrong number, or two rows that mean the same thing but are written differently ("Riyadh" vs "riyadh " after trimming still differ in case, and "Riyadh" vs "Riyad" are different rows). A header row is never treated as a duplicate and never dropped as blank. Ragged rows (fewer cells than the header) are padded with empty cells so the output stays rectangular.

Why CSVs come out messy

A CSV file looks simple, one row per line, commas between fields, but real exports rarely are. Spreadsheet apps add trailing spaces, export tools leave blank lines at the end, a system that merges two lists leaves the same row twice, and a column that used to hold data sits empty after a field is retired. Import tools then choke: a blank row becomes a nameless record, a duplicate row double-counts a sale, and a stray space means "Riyadh " and "Riyadh" sort as two different cities. Cleaning before import is cheaper than fixing the mess after it lands in your contacts, shop or CRM.

This tool cleans in four passes, in this order: trim, drop blank rows, remove exact duplicates, then optionally drop columns that are empty in every remaining row. The order matters. Trimming first means a row that only looked different because of spaces becomes a true duplicate and gets removed in the next pass. Dropping blank rows before dedupe keeps the duplicate count honest. The header row is set aside before all four passes and put back on top untouched, so a header that happens to match a data row can never eat it.

Quoting, the RFC 4180 way

A field that contains a comma, a quote or a line break must be wrapped in double quotes, and a quote inside such a field is written as two quotes. So the value Say "hi", friend is stored as "Say ""hi"", friend". This tool parses and writes by that rule, which is why a comma inside an address does not split the row, and why the cleaned output re-quotes only the fields that need it.

What cleaning cannot fix

Near-duplicates are not duplicates: different capitalisation, different spelling and different date formats all survive, because guessing that two different-looking rows are "the same" would delete real data. If your file has those, sort it in a spreadsheet first, or fix the source system so it stops exporting them.

Frequently Asked Questions

Four things, in order: it trims leading and trailing whitespace from every cell, drops rows that are completely blank, removes rows that are exact copies of an earlier row, and, if you tick the box, drops columns that are empty in every remaining row. The header row is never dropped or deduped.
No. The parser follows RFC 4180: a field wrapped in double quotes may hold commas, quotes (written as two quotes) and line breaks. The cleaned output re-quotes only the fields that need quoting.
Comma by default, with semicolon and tab as options. Pick the one your file uses; a file exported by a European spreadsheet app often uses semicolons because commas are decimal separators there.
No, on purpose. Only exact duplicates are removed after trimming. Removing near-duplicates would mean guessing, and a wrong guess deletes real data. Fix capitalisation in the source system or in a spreadsheet first.
They are padded with empty cells so the output stays rectangular, with the same number of columns in every row. Rows with extra cells keep them, and the header is not extended.
No. The parsing and cleaning run in your browser. The file never leaves your device.

Related Tools

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools