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.
Filters combine with AND. Use the search box for a quick any-column match. Regex filters use JavaScript syntax.
Untick to hide a column (hidden columns are left out of exports). Type to rename — renames apply to exports too.
Exports include your filters, sort, edits and cleanups. Hidden columns are left out; renamed headers apply. The file is generated on your device — nothing is sent anywhere.
How it works
- Drop the file, then hit Stats → Compute column stats — the profile table shows types, empties, distincts and top values per column.
- Apply cleanups from the Clean panel: trim whitespace, collapse spaces, fix case per column (via the column ⋮ menu), find & replace with preview.
- Every cleanup shows as a chip you can remove individually — or “Undo all cleanups” resets the lot.
- 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
- Per-column case fixes live in each column header’s ⋮ menu; the Clean panel’s trim/collapse buttons apply to all columns.
- Regex replace with capture groups handles the structural fixes: dates from 03/31/2024 to 2024-03-31 is find
(\d\d)/(\d\d)/(\d{4}), replace$3-$1-$2. - Distinct counts cap at 10,000 tracked values per column (shown as “10,000+”) — an honest cap, not a wrong number.
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.