Clean a messy CSV file

Real exports are grubby: trailing spaces that break joins, THE SAME FIELD IN THREE CASINGS, “N/A” and “n/a” and “-” all meaning empty, blank rows from a copy-paste, a column that’s numbers except for the four cells where someone typed “TBD”. This page is a wash cycle for that file: one-click trims and case fixes, find & replace with regex and a preview count, empty-row removal, duplicate removal — and column stats that show you the grime before you scrub.

Start with the Stats panel, honestly — it profiles every column in one pass (type, filled/empty counts, distinct values, min/max/mean for numbers, most frequent values). The “status” column with 5 distinct values that should have 3? The amount column that’s 99.7% numeric? That’s your cleaning to-do list, computed rather than guessed. Everything runs locally; the file never uploads.

Preset: the Clean panel opens on load; run Stats first to see what needs fixing.

Drop a CSV, TSV or Excel file here

.csv · .tsv · .txt · .csv.gz · .xlsx — files up to 4 GB open here, in your browser. Nothing is uploaded; the file is read in place on your device.

Paste rows

Paste CSV text or cells copied from Excel / Google Sheets (they paste as tab-separated).

How it works

  1. Drop the file, then hit Stats → Compute column stats — the profile table shows types, empties, distincts and top values per column.
  2. Apply cleanups from the Clean panel: trim whitespace, collapse spaces, fix case per column (via the column ⋮ menu), find & replace with preview.
  3. Every cleanup shows as a chip you can remove individually — or “Undo all cleanups” resets the lot.
  4. Export the cleaned file; the original on disk stays untouched.

A sane order of operations for cleaning

Trim first — surrounding whitespace contaminates everything downstream (dedupe keys, filters, joins), and trimming rarely destroys information. Then normalize the values that mean the same thing: find & replace “N/A”, “n.a.”, “-” to empty cells, unify country spellings, fix casing on the columns where case is noise (emails, state codes) while leaving it alone where it’s signal (names — “LaTonya” isn’t “Latonya”). Then dedupe, since duplicates only reveal themselves after formatting noise is gone. Then re-run Stats to confirm: distinct counts should have dropped to the honest number.

The chips row is your audit trail — each cleanup is listed and individually removable, so “what did I actually do to this file” has an answer. That, plus the untouched original on disk, is what makes aggressive cleaning safe to try.

Good to know

Frequently asked questions

Is any of this destructive to my file?

No — browsers can’t rewrite your local files, so cleanups exist only in the viewer until you export a cleaned copy. The original is your permanent undo; within the session, chips and “Undo all cleanups” give you finer-grained control.

Can I clean just one column?

Yes — every column header has a ⋮ menu with trim, UPPER/lower/Title Case and column-scoped find & replace. The Clean panel’s bulk buttons cover the all-columns cases.

What do the column stats actually compute?

Per column, in one streaming pass over the rows in view: inferred type (number/text/date/boolean/mixed), filled and empty counts, distinct-value count, min/max/mean for numeric columns, and the most frequent values with their counts. On filtered data, stats cover what’s in view — profile before filtering for whole-file numbers.

Can it standardize date formats?

Via regex find & replace, yes (see the tip with the capture-group recipe) — there’s deliberately no automatic date guesser, because 03/04/2025 is genuinely ambiguous and silent guessing is how data gets quietly corrupted.