Skip to content
Dedupe a CSV

Remove duplicate rows from a CSV

Drop exact copies, or keep one row per email, customer ID or any column you choose. Spaces and capitals are cleaned up first, so near-duplicates match too. It all runs in your browser.

Free. No sign-up. Opens with a messy sample list so you can see which rows go.

How it works

  1. Open the sample, then your list

    The notebook opens with a small lead list that has three kinds of duplicate in it. When you've seen how it works, drop your own CSV on the Open file step.

  2. Tidy the key column

    The Format step trims spaces and lowercases Email, so BOB@AOL.COM  and bob@aol.com count as the same address. Point it at whichever column identifies a record in your file.

  3. Keep one row per key

    The Custom SQL step keeps the first row for each email and drops the rest, even if their other columns differ. To use your own file, change "Email" to your key and list your columns on its first line.

CSV Notebook with a lead list in the Open file step, a Format step and a Custom SQL step, and an output with one row per email address

Why CSV Notebook

  • Private

    Runs in your browser. Your files are never uploaded, so nobody else can see them.

  • Repeatable

    No AI and no guesswork: the same steps on the same file give the same result every time. Your steps are saved as a notebook in your browser. Next month, open it and drop in the new file: if a column was renamed, the step that needs it stops with an error that names it, and Pro can map it for you.

  • Auditable

    Every transformation step is SQL you can read, so you can check exactly what happened to your data. Each step also shows a preview of its output and a summary of what it did, so you can see the result before you export.

Worked example

event_leads.csv (8 rows)
first_nameEmailNotes
john JOHN@gmail.com Good lead
JANE JANE@web.com
BOBbob@aol.com
BOBbob@aol.com
BobBOB@AOL.COM Met at booth 12
Mariamaria@company.net
Johnjohn@gmail.comFollow up in December
Stevesteve@demo.org
One row per email (5 rows)
first_nameEmailNotes
john john@gmail.comGood lead
JANEjane@web.com
BOBbob@aol.com
Mariamaria@company.net
Stevesteve@demo.org

Eight rows in, five out. The exact copy of Bob went, and so did two rows that repeated an address with different notes. The first row for each email is the one kept, so Good lead stays and Follow up in December goes.

See which duplicates go

The sample list has an exact copy, a copy in capitals and a copy with different notes. Check which rows survive, then swap in your own file.

Open in CSV Notebook

Frequently asked questions

Which row is kept when two rows share a key?

The first one in the file. The SQL numbers the rows in file order and keeps row 1 for each key. To keep the last one instead, change ORDER BY line_no to ORDER BY line_no DESC inside the query.

Can I remove only rows that are identical in every column?

Yes. Replace the query in the Custom SQL step with SELECT DISTINCT * FROM csv;. Only rows that match in every column are removed, and you can delete the Format step if you don't want spaces and capitals ignored.

Can I dedupe on more than one column?

Yes. List them all after PARTITION BY, for example PARTITION BY "first_name", "LAST_NAME", "Company". Rows are then duplicates only when all of those columns match.

What happens to rows with an empty email?

They are all kept. The query gives each row with a blank email a key of its own (the CASE WHEN "Email" = '' line), so blank rows are never treated as copies of each other. If you'd rather drop them, add a Filter on that column with the is not null condition before the Custom SQL step; it treats empty cells as null.

Is my contact list uploaded anywhere?

No. Lists of names and email addresses are personal data, which is a good reason to keep them off other people's servers. The deduplication runs in your browser and the cleaned file is saved straight to your computer.