Free online tool

Remove Duplicates from CSV Files

Remove duplicates from CSV files by whole row or by key columns, then download a clean copy with the same delimiter, header and encoding.

Remove duplicate rows from a CSV

Choose, drop or paste a CSV, decide what counts as a duplicate, and download the cleaned file. The delimiter, header, encoding and row order stay as they were. Nothing is uploaded.

or drop a .csv, .tsv or .txt file here. Up to 20 MiB and 1,048,576 rows.

How to read it
Compare rows by

Rows are duplicates when every cell matches. Empty cells at the end of a row do not count.

Matching

These options change only how rows are compared. Kept rows keep their values; only quotes a value does not need are dropped.

Which copy to keep

Rows read
–
Rows kept
–
Duplicates removed
–
Duplicate groups
–

Show

Everything runs in your browser. The CSV is never uploaded or stored; only your matching options are remembered on this device.

Whole rows or key columns

Remove rows that repeat in every cell, or tick the columns that identify a record, such as Email, so rows with the same address count as duplicates even when their other cells differ.

Matching you control

Ignore upper and lower case, spaces at the ends or repeated spaces, keep rows whose key is blank, and keep the first copy, the last copy or only the rows that never repeat.

Your file, otherwise unchanged

Kept rows keep their values, delimiter, header, line endings and encoding, including the UTF-8 byte order mark Excel looks for. Nothing is uploaded.

How to remove duplicates from a CSV file

  1. 1

    Choose a CSV, TSV or TXT file, drop it on the page, or paste the CSV text.

  2. 2

    Check the preview and the header setting, then compare by the whole row or tick key columns such as Email.

  3. 3

    Set the matching options and choose whether to keep the first copy, the last copy or only rows that never repeat.

  4. 4

    Look over the removed rows, then download or copy the cleaned CSV, and save the removed rows if you need a record.

What people use this tool for

  • Clean a mailing list exported from a CRM or newsletter tool so each email address appears once.
  • Remove repeated orders or transactions after combining several CSV exports into one file.
  • Find the product codes or IDs that appear more than once in a catalogue export before importing it.
  • Keep the latest record for each customer in a date-ordered export by matching on the customer ID and keeping the last copy.

Frequently Asked Questions

How do I remove duplicate rows from a CSV file?

Choose or drop the file, or paste the CSV text, and the duplicates are found as soon as it is read. With the default settings a row is a duplicate when every cell matches an earlier row, ignoring spaces at the start and end of each value, and the first copy stays. Download or copy the cleaned CSV; the rows that are left keep their original order.

Can I remove duplicates based on one column, such as email?

Yes. Choose Key columns and tick the columns that identify a record. With only Email ticked, rows that share an address are duplicates even when the name or date differs, and if the header has an email column it is ticked to start with. Tick several columns, such as First name, Last name and Company, to match on the combination. Rows whose key is blank are kept by default, so contacts without an email are not merged into one.

Does it ignore upper and lower case or extra spaces?

You choose. By default case counts, because some IDs, such as 15-character Salesforce record IDs, differ only in case, and spaces at the start and end of a value are ignored. Ignore upper and lower case matches Ana@Example.com with ana@example.com and follows Unicode case folding, so ß and ẞ match SS while the Turkish dotless ı stays different from i. Treat repeated spaces as one matches "Ana Lima" with "Ana Lima", counting tabs and non-breaking spaces as spaces. When case alone hides more duplicates, the page says how many. The options affect only the comparison, never the values written to the file.

Which duplicate is kept, the first or the last?

The first copy, unless you choose otherwise. Choose Last to keep the latest entry of a file sorted by date; it stays where it was in the file. Choose None, remove every copy to delete every row that appears more than once and keep only the rows that never repeat. In all three cases the remaining rows keep their original order.

How can I see which rows were removed?

The Removed rows view lists every removed row, 100 at a time, with its row number and the row it duplicates. Row numbers match a spreadsheet, with the header as row 1, and when a value contains line breaks the text-editor line is shown as well. Cells whose text differs from the kept row, such as a different capital letter, show the kept value underneath. Largest groups lists the ten biggest sets of duplicates, and Download removed rows saves them all as a CSV with Row and Duplicate of row columns.

Will the cleaned CSV still open correctly in Excel?

Yes. The download keeps your file's delimiter, header row, line endings and encoding, including the UTF-8 byte order mark that Excel uses to show accented letters correctly, and Windows-1252 and UTF-16 files are saved in the same encoding. Values are written back unchanged. Only quotes that are not needed can disappear, because a value is quoted when it contains the delimiter, a quote or a line break.

How large a CSV can it handle?

Files or pasted text up to 20 MiB, with up to 1,048,576 rows (as many as an Excel sheet), 16,384 columns and 8 million cells. The matching runs in a background thread, so the page stays responsive while a big file is read; in our tests a 10.7 MiB file with 200,000 rows was done in about half a second in a desktop browser. Large files need a lot of memory, so on a phone it can help to split them first.

Is my CSV uploaded or saved?

No. The file is read and processed in your browser and is never sent to a server or stored. Only your matching options, such as Ignore upper and lower case and which copy to keep, are remembered in this browser's local storage under zutilium:csv-duplicate-remover.