Five Messes in One File: Cleaning a CSV From End to End
Duplicates, blanks, stray spaces, messy headers, and mixed dates — fix all five in one CSV Cleaning Studio pass, with a worked example.
↑↓ to navigate · Enter to open · Esc to close
Clean messy CSV files — duplicates, blanks, stray spaces and mixed dates — entirely in your browser.
Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.
Drop a CSV file here or click to browse. Files up to 20 MB and 200,000 rows are accepted, and the file is read on this device only.
Pasted data is parsed with the delimiter and encoding options below, exactly like an uploaded file.
Rename a column by editing its name, untick Keep to drop it, tick Dedupe key to mark it as part of the duplicate check, and use the arrow buttons to change the column order. The badge beside each name is the data type the studio detected from the values themselves. Nothing here takes effect until you choose Apply operations.
Operations always run together, in a fixed order: column keep, rename and reorder first, then trimming, case changes, date standardisation, missing-value handling, the row filter, and finally deduplication. The fixed order matters: duplicate detection sees the already-trimmed, already-standardised values, so two rows that differ only by stray spaces are still recognised as copies.
Deduplication uses the columns you marked as Dedupe key in the column list above. If no column is marked, deduplication is off: two rows count as duplicates only when every key column matches, and the first occurrence is the one kept.
No data loaded yet. Load a file or paste data above, and each Apply will report exactly what it changed here.
The apostrophe is added to the downloaded file only — your on-screen data is never altered by this option. See the FAQ below for why it matters.
“Open in Chart Builder” hands the cleaned table to the Chart Builder in this browser only (via local storage) — nothing is uploaded.
The sample below is a small customer sign-up export with the faults real exports usually have: names padded with spaces, one person entered twice, city names typed in three different case styles, two missing prices, and signup dates written in three different formats. Load it and clean it with the tool itself:
With the sample loaded, try this cleaning pass. Tick Dedupe key on the Email column, tick Trim, set text case to Title Case, set the date format to ISO, set missing values to Fill with the column median, then choose Apply operations. The verified result is:
Undo the pass and try a different missing-value strategy — for example filling with the mean — and the summary will show how the two choices differ before you commit to either in the downloaded file.
A CSV file looks simple — rows of values separated by commas — but that simplicity is exactly why messy files cause so much quiet damage. Almost every system that handles lists of people, products, orders or payments can export a CSV, and almost every other system can import one, which makes CSV the hand-off format between tools that were never designed to agree with each other. The disagreements are small and human: a name typed with a trailing space, the same customer exported twice, a date written as 05/01/2024 by one system and as January 5 by another, a price left blank because nobody filled in the field. Individually each fault looks harmless. Together they break the things people actually do with the data. A mail merge greets “ Alice” with a visible gap. A pivot table counts London, london and LONDON as three different cities. A duplicate row mails the same person twice, or pays a supplier twice. A blank price silently distorts an average. A column of mixed date formats sorts into nonsense and defeats every filter built on it.
Cleaning a file by hand in a spreadsheet is possible, but it is slow, hard to repeat and easy to get half right: you fix the duplicates you notice, trim the cells you happen to select, and have no record afterwards of what changed. The CSV Cleaning Studio takes the opposite approach. It applies a small set of well-understood operations — trimming, case normalisation, date standardisation, explicit missing-value strategies, one clear row filter and key-based deduplication — to the whole file at once, in a fixed, documented order, and then tells you precisely what it did: how many rows went in and came out, how many duplicates were removed, how many cells changed, and a plain-language note for each fill, filter and value it could not interpret. That report is the point. A cleaned file you cannot audit is just a different file you have to trust; a cleaned file with a change summary is one you can check, defend and reproduce next month when the same export arrives again.
The studio also respects the data it is given. Column types are detected from the values, so a case change never rewrites email addresses or numbers, a date operation only touches columns that genuinely hold dates, and a mean or median fill is calculated only from a column’s own numeric values — if a column has none, the tool says so instead of inventing a plausible-looking number. Everything runs in your browser: the file is read on your device, never uploaded, and disappears when you close the tab, which makes the tool safe to use on customer lists, payroll exports and other files that should never be sent to a stranger’s server.
No. The file is read and parsed entirely in your browser, on your device, using the PapaParse library served from this site. Nothing is sent to a server, no copy is kept, and closing the tab discards everything. That is why the tool is safe for customer lists, order exports and other files you would not email to a third-party cleaning service.
You decide, by marking one or more columns as the Dedupe key — typically an email address, account number or order ID. Two rows are duplicates when all of their key columns match exactly, and the first occurrence is kept. Deduplication runs last, after trimming, case and date changes, so rows that differ only by stray spaces or date formatting are still caught. If you mark no key column, deduplication is switched off entirely.
It depends on what the empty cell means. If a missing value makes the row useless — an order with no order number — dropping is honest. If the value is merely unknown and the row still matters, filling keeps the row usable: a fixed value such as “Unknown” is clearest for text, while the median is usually the safest fill for numbers because a few very large or small values cannot drag it the way they drag a mean. The change summary always states how many cells were filled, in which column, and with what, so the choice stays visible to anyone who later questions the data.
Spreadsheet applications treat any cell beginning with =, +, − or @ as a formula. If a name, address or comment in your data happens to start with one of those characters — or was placed there deliberately by whoever supplied the file — opening the CSV can execute it as a formula rather than showing it as text. Formula-safe export prepends an apostrophe to such cells in the downloaded file only, which forces spreadsheets to treat them as plain text. Your on-screen data is never changed by this option.
Yes. Every Apply is recorded, and Undo steps back one Apply at a time, up to twenty steps. Start over restores the file exactly as it was loaded and clears that history, but note that it cannot undo a re-parse: if you changed the delimiter or encoding, the file was re-read at that point and that reading becomes the new starting point. Nothing is final until you download, so experimenting is free.
Because the work happens in your browser tab, the practical limits are your device’s memory and patience rather than a server plan. Twenty megabytes and two hundred thousand rows cover the overwhelming majority of everyday exports while keeping parsing and previews responsive on ordinary hardware. Larger datasets are better handled by a database or a scripting tool — and if your file is refused, splitting it, cleaning the parts and recombining them produces the same result.
Build charts from CSV data with aggregation, sorting and accessible colour palettes. Export as PNG or SVG.
LiveFormat, validate, minify, query and compare JSON in your browser, with precise line-and-column errors.
LiveTest patterns against sample text with match highlighting, capture groups and a safe one-second timeout.
LiveDuplicates, blanks, stray spaces, messy headers, and mixed dates — fix all five in one CSV Cleaning Studio pass, with a worked example.
One CSV column, three date styles, silent misreads. Learn why imports swap day and month — and how standardising dates fixes it.
Trailing spaces, hidden duplicates, and inconsistent headers make clean-looking CSVs fail. Find the invisible problems before import.