Clean CSV

How to Clean a CSV File: Duplicates, Extra Spaces, Dates and More

Exports are messy: stray spaces, empty and repeated rows, dates written three ways. Find every problem and fix it in a few clicks, in your browser, then download a clean CSV.

By PickyPDF team · · 5 min read

Also in: Deutsch · Español · 한국어 · 简体中文

Almost every CSV that comes out of a shop, a CRM, a form or a spreadsheet needs tidying before it's useful. Names have spaces at the end, the same customer appears twice, there are empty rows in the middle, one column has dates written three different ways, and prices come with currency signs and thousands separators that other programs can't read.

You can fix all that by hand in a spreadsheet, but it's slow and easy to get wrong. This guide shows how to do it in a few clicks with Clean CSV, for free, without uploading your file anywhere.

What "cleaning" a CSV means

Cleaning a CSV means fixing the things that stop the data being sorted, counted, imported or matched:

  • Extra spaces. "Ana " and "Ana" look the same but don't match, so lookups and duplicate checks miss them.
  • Empty rows. Blank lines left over from copying or exporting.
  • Duplicate rows. The same row twice, or the same email address on two rows.
  • Empty columns and bad column names. Columns with nothing in them, and names that are blank or used twice, which many import tools refuse.
  • Inconsistent values. Dates like 31/01/2026, Jan 31, 2026 and 2026-01-31 in one column, or numbers like $1,200.50 that a database can't read as a number.

How to clean a CSV file

  1. Open Clean CSV.
  2. Choose your file, drop it onto the page, or paste the table. It can be a .csv, .tsv, .txt or Excel .xlsx file.
  3. Read "What we found". The cleaner lists the problems it sees, with a count for each and a button to fix it.
  4. Click the fixes you want, then use the column tools for anything else. The preview shows the result as you go.
  5. Click Download CSV. You get the clean table as a new CSV file.

The separator (comma, semicolon, tab or pipe) and the text encoding are worked out for you. If the first row isn't column names, untick "First row is the column names".

One-click fixes

The "What we found" list shows only the problems your file really has:

  • Trim spaces removes spaces at the start and end of every cell. Leave "Also turn double spaces into one" ticked to tidy doubled spaces inside cells too. Line breaks inside a cell are kept.
  • Remove empty rows takes out rows with nothing in them.
  • Remove duplicate rows removes rows exactly the same as an earlier one and keeps the first.
  • Remove empty columns takes out columns with no values.
  • Fix names gives blank columns a name ("Column 3") and numbers repeated names ("Email (2)"), so every column name is different.

When there's nothing left to fix, it says "No problems found".

Column tools

Pick a column at the top of Column tools, then:

  • Change case: UPPERCASE, lowercase or Title Case. Lowercase is handy for email addresses before removing duplicates.
  • Find and replace in that column or every column. Tick "Whole cell only" to replace "n/a" without touching "Canada", and "Match case" when capitals matter.
  • Fill blank cells with a value such as "Unknown" or 0.
  • Rename the column.
  • Remove rows that repeat a value in this column, for example keeping one row per email address. Rows with that cell blank are kept.
  • Move the column left or right, or remove it.

Dates and numbers

Dates can be written one way in the whole column: 2026-01-31, 31/01/2026, 01/31/2026, 31.01.2026, 31-01-2026 or 2026/01/31. The cleaner reads dates written with numbers, with month names (31 Jan 2026, January 31, 2026, and German and Spanish month names) and Korean or Chinese dates, and keeps any time after the date.

A date like 03/04/2026 could be 3 April or 4 March. The cleaner looks at the rest of the column: a date such as 25/04/2026 shows the day comes first. If nothing in the column decides it, it follows how your device writes dates, and you can always choose "Day first" or "Month first" yourself.

Numbers lose their currency signs and thousands separators, and you choose the decimal mark: $1,200.50 becomes 1200.50, 1.234,50 € becomes 1234.50 (or 1234,50), and (12.00) becomes -12.00. Percent signs are kept.

Cells that can't be read as a date or a number stay as they were, and the list of fixes says how many, so nothing is changed by guesswork.

Split, join, sort and filter

  • Split a column at a comma, space, semicolon, hyphen, slash or any other character. "Ana Lopez" split at the space becomes two columns, "Name 1" and "Name 2".
  • Join two columns, such as first and last name, with a space, a comma, a hyphen or nothing between them. When one of the two is blank, no stray separator is added.
  • Sort rows by a column, A to Z or Z to A. Numbers sort by value (9 before 10), dates by date, and blank cells go last.
  • Keep or remove rows where a column contains, is, starts with, ends with, is blank, or is more or less than a value. For example, remove rows where Country is blank, or keep only orders more than 100.

Excel files

Choose an .xlsx file and it's read straight away; if the workbook has several sheets, pick one from the Sheet menu. Cells come in as Excel shows them: dates as dates, percentages with a % sign, and formulas as their result. The clean table is saved as CSV.

Old .xls files and workbooks with a password can't be read. In Excel, choose File > Save As and save them as Excel Workbook (.xlsx) or CSV without a password first.

Undo, and nothing changed you didn't choose

Only the fixes you click are made. Each one is listed under "Fixes applied" with what it changed, such as "Removed 3 duplicate rows". Undo last takes back the latest fix and Start over returns to the file as it was. A fix that finds nothing to change says so and isn't added.

Saving the clean file

Choose the separator for the new file, which can differ from the one you opened: semicolons are common in Germany and Spain, for example. Leave "Open correctly in Excel" ticked so Excel shows accented letters right; untick it for programs that don't expect Excel's byte order mark. Copy puts the clean table on your clipboard instead.

The file is named after yours, the tool and the date, for example customers-clean-csv-PickyPDF-2026-11-27.csv.

How big a file can it clean?

Up to 50 MB and 200,000 rows (3 million cells). The whole table is held in your browser so every fix can be undone. For bigger files, cut them into parts first with Split CSV.

Is it private?

Yes. Your file is read and cleaned in your browser and never leaves your device, which matters for customer lists, orders and payroll. Only a count of how many files you cleaned today is sent to our server.

  • File too big? Split CSV splits files of several gigabytes into smaller ones.
  • Need a printable table? CSV to PDF turns the clean CSV into a PDF with the header on every page.

Clean CSV is free and needs no sign-up.

Frequently asked questions

How do I clean a CSV file?

Open Clean CSV and choose your file or paste the table. It lists what looks wrong, such as extra spaces, empty rows, duplicate rows and empty columns, with a button to fix each. Use the column tools for anything else, then click Download CSV.

How do I remove duplicate rows from a CSV?

Click Remove next to the duplicate rows in What we found. It removes rows the same as an earlier one and keeps the first. To keep one row per email address or ID, pick that column and use Remove rows that repeat a value in this column.

How do I make all dates in a CSV the same format?

Pick the date column, choose a format under Dates, such as 2026-01-31, and click Apply. It works out whether the day or the month comes first, and cells it can't read stay as they are.

Can I clean an Excel file?

Yes, .xlsx files. Pick the sheet if there are several; the clean table is saved as CSV. Old .xls files and workbooks with a password need saving as .xlsx or CSV first.

Can I undo a fix?

Yes. Undo last takes back the latest fix, and Start over returns to the file as it was.

Is my file uploaded?

No. It's cleaned in your browser and never leaves your device.

Related tools

More from our blog