Remove duplicate CSV rows
Drop a later row when every cell matches an earlier row exactly. The comparison is case-sensitive, spaces count, and the first copy stays.
CSV or Excel
Details
Instructions
- Drop a .csv file. Remove duplicate rows is already selected.
- Preview the later rows that match an earlier row cell for cell.
- Apply to keep the first copy of each exact row.
- Download the table, or undo if you need the previous one.
Example
Three data rows share a city. Only two of the name cells are the same characters.
name,city Ada,Tokyo ada,Tokyo Ada,Tokyo
The third row is removed because it repeats the first row exactly. ada,Tokyo stays, because the lowercase name is a different cell. The kept text is not trimmed.
What counts as the same row
The cleaner builds one key from every cell, in order. It does not trim the cells and it does not change their case. Ada,Tokyo matches another Ada,Tokyo. It does not match ada,Tokyo, and it does not match a row whose name still has a leading space.
001 and 1 stay different because both cells are text. The statistics may call a column an integer, but this comparison uses the characters you see.
When the whole row is the wrong test
Two rows that share a name and differ in another column are both kept. Nothing is merged, and the later row is not used to fill a blank cell.
Use duplicates by column when only some columns should matter. Trim first if spaces at the edges should not keep two otherwise identical rows apart.
Limitations
- The first matching row is kept. There is no control for keeping the last row instead.
- Spaces and letter case are part of the value. A padded copy is not an exact copy.
- This operation does not trim cells and does not remove a row that is only partly blank.
- Other operations are available below, but only remove duplicate rows starts selected.
- CSV and .xlsx up to 32 MB. The download is CSV. Save .xls as .xlsx first.