Blog

How to remove duplicate rows from a CSV file

Remove identical rows from a CSV in your browser, check what counts as a duplicate, and save a clean copy without changing the original.

Emily ParkerTools and utilities 4 min read

You have repeated entries in a CSV and want to clean them up without deleting information by mistake. The key is knowing whether you mean entire rows that match or records that share just one value, such as an email address.

Use the CSV Editor to open the file, remove duplicate rows, and save a cleaned copy in your browser. Keep the original file until you have checked the result.

Remove duplicate rows from your CSV

  1. Open the CSV Editor and choose the CSV file you want to clean. The file opens in your browser and stays on your device.
  2. Look at the column headers and a few rows. Decide whether you want to remove rows that match across the whole row, or records that repeat only in one column. Those are different jobs.
  3. Use the editor's remove duplicates feature. If it offers a choice of columns, use all columns to remove only identical rows. Choose a single column only when you intend to keep one record for each value in that column.
  4. Check the rows left after the duplicates are removed. Confirm that the header is still present and that a row you expected to keep has not disappeared.
  5. Save or export the cleaned CSV as a new file. Give it a different name, such as customers-clean.csv, so you can return to the original if you spot a problem.

If you need to correct a value before saving, see how to correct a CSV and save the edited file. Checking a copy first is especially useful when the file contains orders, payments, or other records you cannot easily recreate.

What counts as a duplicate row?

Every field in the rows matches

These are full-row duplicates. For example, if two rows have the same name, email, date, and order number, one may be an accidental copy of the other. Removing one copy leaves the same information in the file.

Only one field matches

Two rows with the same email address are not necessarily duplicates. They might represent two different orders or visits. If you remove one just because that field matches, you could lose a valid record. Check the other columns before choosing a one-column match, if the editor provides that option.

No rows are removed

The rows may look alike on screen but contain different values. A trailing space, a different date format, or a different character can make two entries unequal. Compare the full rows, not just the part that catches your eye.

If duplicates remain or the result looks wrong

  1. Check the match rule. If you meant identical full rows, make sure the duplicate check included every relevant column. If it checked only one column, it may have removed records that were different in other ways.
  2. Compare the values carefully. Look for leading or trailing spaces, different capitalization, punctuation, or dates written in different formats. For example, Sam Lee and Sam Lee can look the same but contain different text.
  3. Search for the value you expected to remove. The CSV Editor can find text in a file. Search for a repeated name, email, or ID, then compare the surrounding fields to see what differs.
  4. Standardize only what should be the same. Edit inconsistent spaces or formats only when you are sure they represent the same value. Do not change capitalization or remove punctuation from IDs without checking, because those differences may matter in your data.
  5. Return to the original if rows went missing. Close the cleaned copy without replacing your source file, then repeat the process with the right matching rule. If you already saved over the original, check your backup or file history before making more changes.

Why the number of rows can change

Removing duplicates keeps one copy of a matching row and removes the extra copies. If a row appears five times, the cleaned file should retain one instance, not five. The number of rows removed can therefore be smaller than the number of repeated entries you noticed.

A CSV file may also include a header row with column names. Treat it as a label, not as a record. After cleaning, confirm that the column names still appear once at the top and that the remaining values are under the correct columns.

The CSV Editor opens and edits files in your browser. Your CSV stays on your device, so save a separate copy before replacing or sharing the cleaned file.