Skip to content

Convert

CSV Dedupe

CSV Dedupe

Beta

Remove duplicate rows from a CSV or TSV file by the columns you choose, keeping the first or last copy. Runs in your browser; the file is not uploaded.

Use via API
  • Free, no sign-up
  • REST + MCP
  • Updated
  • Reviewed by Olgun Ozoktas
Runs in your browser · nothing is uploaded

Input

No data yet — drop a file or paste CSV text

0 rows

Kept and removed rows will show here

Pick key columns after loading, or leave them empty to compare whole rows.

Runs in your browser; the file is not uploaded. Analytics and ads may load on the page.

Why Use CSV Dedupe?

Exports from CRMs, newsletter tools, forms and shops often hold the same record more than once: a customer who signed up twice, a contact typed once in lower case and once in capitals, or a row appended by a second import. CSV Dedupe removes those repeats by the columns you choose, such as email, and hands back two files: the cleaned table and the rows it removed, so you can check every decision. It reads the file in your browser, keeps the cells exactly as written, and never changes the order of the rows it keeps.

CSV Dedupe removes repeated rows from a delimited table. It reads the text with the usual CSV rules: a field wrapped in double quotes may hold the delimiter or a line break, and a doubled quote inside it is a literal quote. Comma, semicolon, tab and pipe are detected from the first line, or you can choose one. The first row is treated as the header unless you turn that off, in which case the columns are named column_1, column_2 and so on. Blank lines are skipped and do not count as rows. A header name that appears twice is renamed with a suffix such as email_2 so every column can be picked.

A row is a duplicate when its key matches the key of another row. With no key columns picked, the key is the whole row, every cell it has. With key columns picked, only those cells are compared, so two rows with the same email but a different name or country count as duplicates. Before comparing, Trim whitespace ignores spaces at the start and end of each cell and Ignore case ignores letter case; the cells themselves are never changed. A row whose key cells are all empty is kept as unique by default, because an empty email is not the same person as another empty email; choose Collapse into one to treat empty keys like any other value.

Keep first row keeps the earliest occurrence of each key and Keep last row keeps the latest. Either way, the rows that survive are written in the order they had in your file, and the removed rows go to a second file in their original order too. Both files carry the header and use the delimiter the input was read with. The status line counts the rows read, kept and removed, and the Removed duplicates tab shows the first 50 removed rows with ignored spaces marked.

The page works on files up to about 10 MB. Larger inputs are processed in the background so the tab stays responsive. If a quoted field never closes, the page stops, names the line and removes nothing. To combine several files before deduplicating, use CSV Merger. To compare the cleaned file with the original by key, use CSV Diff. For plain lists that are not tables, use Duplicate Line Remover.

How it compares

Excel's Remove Duplicates and Google Sheets' Data cleanup both remove repeated rows by the columns you tick, keep the first occurrence and change the sheet in place. They do not give you a separate list of what was removed, and opening a CSV in a spreadsheet can change values on the way in, such as leading zeros in IDs or text that looks like a date. CSV Dedupe works on the text, writes every cell back exactly as it was, lets you keep the last occurrence instead of the first, and hands you the removed rows as their own file. In pandas, drop_duplicates(subset=[...], keep='first') does the same exact matching and also offers keep='last'; trimming and case folding need their own steps there, and here they are two checkboxes. None of these, this page included, does fuzzy matching: "Jon Smith" and "John Smith" are different values, and deciding that two differently written records are the same person is not something this tool attempts.

Tips for Deduplicating CSV Files

  • Email addresses are usually safe to compare with Ignore case on; names and IDs usually are not.
  • Trim whitespace is on by default, so " [email protected]" and "[email protected]" match. The cells are written out with their spaces, unchanged.
  • Pick several key columns to build a composite key, for example first_name + last_name + postcode. A row is a duplicate only when every picked column matches.
  • Keep last row is the one to use for an export where later rows are newer versions of the same record. The kept rows still come out in file order.
  • The duplicates file uses the same header and delimiter as the cleaned file, so you can open both side by side or feed the duplicates to CSV Diff.
  • Both downloads use LF line endings and quote only the cells that need it.

Frequently Asked Questions

What is the difference between whole-row and key-column matching?

With no key columns picked, a row is a duplicate only when every cell matches another row. With key columns picked, only those columns are compared: pick email and two rows with the same email but a different phone number or country count as duplicates, and one of them is removed.

Which copy is kept, and does the row order change?

Keep first row keeps the earliest occurrence of each key and Keep last row keeps the latest. The order never changes: the kept rows are written in the order they had in your file, and so are the removed rows in the duplicates file.

Can I match on more than one column?

Yes. Pick several key columns and they form a composite key. A row is a duplicate only when all of the picked columns match, for example the same first name, last name and postcode.

Do spaces and upper case letters count?

By default spaces at the start and end of a cell are ignored and letter case counts. Turn off Trim whitespace to make spaces count, and turn on Ignore case to treat [email protected] and [email protected] as the same. The downloaded cells keep their original spaces and case either way.

What happens to rows with an empty key?

A row whose key cells are all empty is kept as unique by default, so ten rows with no email are all kept. Choose Collapse into one under Blank keys to deduplicate them like any other value, which keeps one of them.

Does it handle quoted fields, commas and line breaks inside cells?

Yes. A field in double quotes may contain the delimiter, line breaks and doubled quotes, and it is read as one cell and written back quoted. If a quote opens and never closes, the page stops, names the line and removes nothing until it is fixed.

How large a file can it handle?

Up to about 10 MB of text. Inputs over about 2 MB are processed in the background so the page stays responsive while it works. The preview shows the first rows; the downloads always contain every row.

Is my file uploaded?

Runs in your browser; the file is not uploaded. Analytics and ads may load on the page.

Can it find near-duplicates, like Jon Smith and John Smith?

No. Matching is exact after the optional trimming and case folding. Different spellings, typos, nicknames or reformatted phone numbers are different values, and the tool does not guess whether two records belong to the same person.

Can I use it from code or an AI assistant?

Yes. The same logic is available as the csv_dedupe tool through the FindUtils REST API and the MCP server. It takes the CSV text, the key columns and the same options, and returns the cleaned CSV, the duplicates CSV and the counts. Text sent there is processed on the server rather than in your browser.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool