Tools
Compare Two CSV Files
Paste or drop two CSV files and match their rows by a key column. See which rows were added, removed or changed, cell by cell, whatever the row and column order. Your data stays in your browser.
Your files stay on your device: the comparison runs in your browser and nothing is uploaded.
5 rows · 5 columns · comma (detected)
5 rows · 6 columns · comma (detected)
Only in file B: "country" (not compared)
| Status | Line | id | name | plan | seats | countryonly in B | |
|---|---|---|---|---|---|---|---|
| Added | B 6 | 106 | Barbara Liskov | barbara@example.com | Free | 1 | US |
| Removed | A 5 | 104 | Edsger Dijkstra | edsger@example.com | Pro | 3 | n/a |
| Changed | A 4B 2 | 103 | Grace Hopper | grace@example.com | Old value: TeamNew value: Enterprise | Old value: 12New value: 40 | US |
| Changed | A 3B 4 | 102 | Alan Turing | alan@example.com | Old value: FreeNew value: Pro | 1 | UK |
How the CSV comparison works
A line-by-line diff falls apart on CSV files: sort the rows differently or move a column and every line looks changed. This tool compares two CSV files the way a database would. It matches rows by a key column, such as id, email or sku, and matches columns by their header name. Row order and column order never create a difference.
File A is the original and file B is the new version. A row whose key is only in B is added, a row whose key is only in A is removed, and a row whose key is in both with at least one different cell is changed. Changed cells show the old value struck through above the new one. Columns that exist in only one file are listed but never counted as changes.
Values are compared as exact text. 1, 01 and 1.0 are different, and so are Paris and paris or a value with a trailing space. If a key appears on more than one row in a file, the tool warns you, names the key and the number of rows, and compares only the first of them.
The parser follows RFC 4180: quoted fields can hold the delimiter, doubled quotes and line breaks, and CRLF, LF and CR line endings all work. The delimiter (comma, semicolon, tab or pipe) and the header row are detected, and you can override both. Opened files are decoded as UTF-8, UTF-16 or Windows-1252. Everything runs in your browser, and large files are processed in a background worker so the page stays responsive.
Worked example
Two exports of the same customer table. File B has its columns in a different order, an extra country column and its rows shuffled. Matching by id:
id,name,plan
101,Ada,Pro
102,Alan,Free
104,Edsger,Proplan,id,name,country
Pro,102,Alan,UK
Free,106,Barbara,US
Pro,101,Ada,UKAdded id 106 (Barbara, Free)
Removed id 104 (Edsger, Pro)
Changed id 102 plan: Free → Pro
Unchanged id 101
Only in B country (not compared)The exported CSV has a diff_status column (added, removed, changed (old), changed (new)), a diff_changed_columns column and every data column, quoted so it opens cleanly in Excel or Google Sheets.
Frequently asked questions
How do I compare two CSV files and find the differences?
Paste or drop both files, check that the key column (the one that identifies a row, such as id) is selected, and read the added, removed and changed counts. Click a count to list only those rows, then download the result as CSV.
What if my rows have no single unique column?
Select several key columns. They form a composite key, so user + date matches a row only when both values match.
Does the order of rows or columns matter?
No. Rows are matched by key and columns by header name. Without a header row, columns are matched by position (column 1, column 2…).
What happens with duplicate keys?
The tool shows a warning naming each duplicated key, the file and how many rows share it. Only the first row with that key is compared, so fix or deduplicate the data if the later rows matter.
Are my CSV files uploaded anywhere?
No. Parsing and comparison run entirely in your browser, and the files never leave your device.
My file uses semicolons. Will it work?
Yes. Semicolons (common in European Excel exports), tabs and pipes are detected automatically, and you can pick the delimiter yourself if the guess is wrong.