All CSV tools

Remove CSV duplicates by selected columns

Choose which columns define a duplicate. Keep the first or last matching row without deleting cells from the middle of a record.

Repeated paper rows lifted from a spreadsheet.

Files stay in this tab. No upload or account. UTF-8 text only, up to 5 MB total, 50,000 data rows and 500,000 cells. Each file must start with unique, nonblank column headers.

No files selected.

Not sure? Check the separator with a small sample first.

Output options
Columns to compare

Choose files or try the synthetic example.

How to use this tool

  1. Choose a UTF-8 CSV file and its separator, then read the columns.
  2. Select the columns that define a duplicate. Select all columns to compare entire rows. Choose first or last occurrence in file order.
  3. Remove duplicates, compare the removed-row count with your expectation, and download the result.

Try a small example

The synthetic example contains two rows with id 001 and one with id 002. Select only id and keep the first occurrence. Two data rows remain, and id 001 keeps the name Ada. Selecting every column keeps all three rows because the names differ.

What to check before downloading

Matching is exact and case-sensitive. Spaces, blank values and leading zeros are significant. Blank keys match other blank keys. Last means last in file order, not the newest date. The tool does not sort or guess which record is correct.

The preview shows the first five data rows and eight columns, with cells shortened to 120 characters. Downloads contain the full result. Output uses UTF-8, commas, quoted fields and CRLF record endings. Your original files stay unchanged.

How do I keep the newest duplicate?

First sort your source by a verified date column, oldest to newest. Then use last occurrence. This tool does not parse dates, so it cannot establish which row is newest on its own.

Will Excel keep my leading zeros?

These tools preserve text such as 001 and long identifiers in the downloaded CSV. A spreadsheet can still convert them when opening it. Import identifier columns as text. A CSV cannot restore digits that were already lost.

Related tools and guides

Sources

Testing notes

Automated JavaScript tests cover quoted fields, embedded line breaks, Unicode, malformed records, column matching and output row counts. The tools operate on CSV text. They do not test Excel or Google Sheets import behavior.