CSV column cleaner

Pick the columns, set their order, clean the values and export the same format.

How to use it

  1. Paste your table into the box. The columns appear as a strip of chips under it, each showing how many of its values are empty and how many are distinct, so you can decide what to keep without guessing from the name.
  2. Click a chip to drop that column, click it again to bring it back in the same place. The arrows move a kept column one position earlier or later — that order is the order of the output columns. Tick “Trim stray spaces”, “Letter case”, “Drop empty columns” or “De-duplicate by kept columns” as needed; the result redraws immediately, there is no button to press.
  3. Copy or download the result. It keeps the delimiter and line endings of your input, so a tab-separated paste stays tab-separated; the on-screen text, the copy and the download are the same string.

Example

Input (CSV)

order_id,customer,note,discount,city,zip
1001,"  Popescu, Ana  ",asked for a refund,,,00501
1002,Ben Carter,,,"Berlin ",10001
1003,"Chen, Wei","rush order, please",,,00601
1002,Ben Carter,,,"Berlin",10001

Output (with Trim, Drop empty columns and De-duplicate on)

order_id,customer,note,city,zip
1001,"Popescu, Ana",asked for a refund,,00501
1002,Ben Carter,,Berlin,10001
1003,"Chen, Wei","rush order, please",,00601

Five things to check in that output: the discount chip reads “empty 4 · unique 0”, so it is the column “Drop empty columns” removed and the notice names it; row 4 became a duplicate of row 2 only after trimming, because row 2 held “Berlin ” with a trailing space — with Trim off both rows stay and nothing is removed; 00501 kept its leading zeros because values are never read as numbers; “Popescu, Ana” keeps its quotes since the comma is inside the value, while Berlin needs none; and the two counters — columns 6 → 5, rows 4 → 3 — are exactly the two things that changed.

Rules, limits and known issues

  • Nothing is uploaded: the text is parsed, cleaned and redrawn in this page only. No file upload, drag-and-drop or URL fetch — paste the text. To open a local .csv (especially GB18030, Big5 or Windows-1256 encoded), use the CSV viewer and copy the text from there.
  • By default nothing is changed: Trim, letter case, dropping empty columns and de-duplication are all off, and every column is kept. Unticked Trim means " " still counts as a value, so "ABC" and "ABC " are not treated as the same cell when de-duplicating.
  • Trim removes leading and trailing whitespace only — including full-width spaces, non-breaking spaces and zero-width characters — and never touches spaces inside the value. Direction marks such as LRM/RLM are kept, because removing them breaks Arabic text. Header names are never trimmed or case-folded: they are how you recognise the column.
  • Values are never read as types or dates. 89.90 stays 89.90, 00721 keeps its leading zero, 03/04/2026 is not parsed. Ambiguous formats are never guessed at, and no full-width/half-width or punctuation normalisation is done — the text cleaner covers that.
  • De-duplication compares the kept columns exactly (no case folding, no locale collation, so results do not depend on the interface language), keeps the first occurrence and lists the removed row numbers. There is no "keep the last one" option, and rows are never reordered.
  • Empty columns are dropped only when every data row is empty in them; the column names are listed so you can see what disappeared. Rows that are empty across all kept columns are removed, also by row number. Short rows are padded with empty cells so columns stay aligned.
  • The column strip shows the empty/unique counts only up to 5,000 data rows; above that it says so instead of sampling a part of your table and presenting it as if it were the whole.
  • Input is capped at 1,000,000 characters; above 200,000 the result waits until you stop typing and tells you. Malformed CSV is never rejected: an unclosed quote is folded to the end of the text and its row is named, blank lines are skipped and counted, rows with a different field count are listed.
  • The output has no byte-order mark and no trailing newline, and it is identical to what you copy. If Excel shows mojibake when double-clicking a non-Latin CSV, import it via Data → From Text/CSV and pick UTF-8.
  • The result is rewritten with minimal quoting: a field is quoted only when it contains the delimiter, a quote or a line break, so an input that quotes everything comes out unquoted and an empty field written as a pair of quotes comes out empty. With all options off the values themselves do not change, and the delimiter and line endings of your input are kept.
  • Out of scope: editing cells, renaming headers, splitting or merging columns, find & replace or regular expressions, sorting rows, and type or date conversion — the CSV viewer, the CSV ⇄ JSON converter and the text cleaner cover those.

Neighbouring steps on the same table: open it, reshape it, convert it.