CSV Cleaner

Drop a CSV in and clean it: trim the spaces around cells, drop blank rows, remove duplicate rows, throw away columns that are empty everywhere, and normalise the headers into snake_case. The row count before and after is shown so you can see what was actually removed rather than trusting it. The ordering of these steps is not arbitrary — cells are trimmed before anything is judged empty or duplicate, because otherwise a row of three spaces survives 'remove blank rows' and 'Ada' and 'Ada ' count as two different people. Whole folders can be dropped at once and downloaded back as a ZIP. Files are read on your device and never uploaded, which matters given that the CSVs most in need of cleaning are customer and contact lists.

Order of operations, and why

StepWhy it runs there
Collapse whitespaceBefore anything measures the cell
Trim cellsSo a row of spaces reads as blank
Drop blank rowsAfter trimming, or they survive
Drop blank columnsHeader counts, so named columns stay
Drop duplicatesAfter trimming, or 'Ada ' looks unique
Normalise headersLast, on the row that survived

When to use it

  1. Tidy an export before importing it into a CRM or a database.
  2. Remove the duplicate rows a merge or a re-export introduced.
  3. Strip trailing spaces that are breaking a lookup or a join.
  4. Turn human headers like 'First Name' into first_name for a database import.
  5. Drop the trailing blank rows a spreadsheet adds on export.

How to Use

  1. Drop your CSV files or folders in, or paste the data.
  2. Tick the cleaning steps you want.
  3. Download the cleaned file, or the whole batch as a ZIP.

Features

  1. Trim cells and collapse repeated spaces
  2. Remove blank rows and all-blank columns
  3. Remove duplicate rows, keeping the first
  4. Normalise headers to snake_case
  5. Before and after row counts
  6. Bulk folders with a ZIP download, all client-side

FAQs

Is my CSV uploaded?

No. It is parsed and cleaned in your browser, and nothing is sent anywhere. That is the reason to use this rather than pasting a customer list into a server-side service.

Will cleaning break quoted fields or embedded commas?

No. Parsing follows RFC 4180, so a quoted field containing commas, doubled quotes or a line break inside it survives a round trip intact. Quoting is recalculated on output, so a field only carries quotes if it still needs them.

Why is a row of spaces removed as blank?

Because cells are trimmed before emptiness is judged, which is almost always what you want. A row containing nothing but whitespace is blank to a person, and leaving it in defeats the purpose of the option. Turn off 'trim spaces' if you need whitespace preserved exactly.

Does removing duplicates keep the first or the last row?

The first. Later identical rows are dropped, so the original order of the rows you keep is unchanged. The header row is never counted as a duplicate of a data row.

What counts as an empty column?

One where every cell is blank, including the header. A column with a header but no data yet is kept, because dropping it would change the shape of a file that is still being filled in.

What is a BOM and why does it matter?

A byte-order mark is an invisible marker some tools, notably Excel, write at the start of a UTF-8 file. It becomes part of the first header, which is why a first column sometimes refuses to match by name. It is removed automatically here.

Technical Details

The cleaning steps run in a fixed order, and the order is the part that decides whether the result is right. Cells are trimmed before emptiness is judged, because a row containing three spaces is a blank row to a human and is not one to a naive check — clean in the other order and it survives. Duplicates are removed after trimming for the same reason: without it, Ada and 'Ada ' count as two different people, which is exactly the duplicate you were trying to find. The header row is never treated as a duplicate of itself, so a single-column file whose header repeats a value does not quietly lose its header. A column counts as empty only when every cell including the header is blank, so a named column that has no data yet is kept — dropping it would change the shape of a file someone is still filling in. Parsing is full RFC 4180: quoted fields containing the delimiter, doubled quotes, embedded newlines and CRLF all survive a round trip, and a UTF-8 BOM is removed rather than becoming part of the first header, which is the usual reason a first column mysteriously will not match by name. Header normalisation lowercases and replaces every run of non-alphanumeric characters with a single underscore, trimming any that end up at the edges, which is what makes a header usable as a database column name. Everything runs in your browser — the file is never uploaded, which matters because the CSVs people need to clean are usually customer lists.

Data & CSV Tools

Data & CSV Tools

  • CSV Viewer
  • JSON \u21c4 TOON
  • TOML Formatter
  • JSON Deep Merge
  • JSON Lines \u21c4 CSV
  • SQL INSERT to CSV
  • JSON Normalizer
  • CSV \u21c4 YAML