Compare CSV files row by row
When two exports of the same table differ, a line-by-line text diff is rarely helpful: one inserted row or a different column order makes every following line look changed. This tool lets you compare CSV files the way a database would. It matches rows by a key, lines up columns by name, and reports each difference as an added row, a removed row or a changed cell with its old and new value. It runs in your browser, so the files are not uploaded.
Matching rows by key column
Choose the column that identifies a record, such as id, sku or email. The tool suggests the first shared column whose values are unique and non-empty in both files. When one column is not enough, tick several: region + sku together form a composite key. A key found only in file A is removed, a key found only in file B is added, and a key in both files is changed when any compared cell differs.
If a key appears more than once, the rows with that key are paired in the order they appear and a warning tells you how many keys repeat, so you can add another key column. Rows are matched with hash maps, so even files with tens of thousands of rows compare in well under a second on a typical computer.
Matching rows by position
Choose By row position when the files have no ID column and the row order is meaningful: row 2 of file A is compared with row 2 of file B. Extra rows at the end of the longer file are reported as added or removed. An inserted row in the middle shifts everything after it, so use a key when you can.
Example
File A File B
id,name,plan,seats id,plan,name,seats
101,Ava Martinez,Pro,5 101,Pro,Ava Martinez,6
102,Noah Kim,Free,1 103,Team,"Rossi, Mia",12
103,"Rossi, Mia",Team,12 107,Free,Olivia Davis,1Compared by id, with columns matched by name, the result is: 101 changed (seats 5 → 6), 102 removed, 107 added, and 103 unchanged even though its columns are in a different order.
Options for a fair comparison
- Match columns by header name lines up columns regardless of their order; names are compared without case and surrounding spaces. Untick it to compare column 1 with column 1. Columns found in only one file are listed and not compared.
- Ignore case treats “Lucas Brown” and “lucas brown” as equal.
- Trim spaces (on by default) ignores spaces at the start and end of a cell.
- Ignore columns skips columns you expect to differ, such as
updated_at. - Numeric tolerance compares numbers by value: with ±0.01,
120.00equals120and19.995equals20. Numbers written as1,234.50,$12or15%are understood.
Reading the results and exporting the differences
The summary shows how many rows were added, removed, changed and unchanged. Click a count to hide or show that kind of row. Changed cells are shown as old → new, struck through in red and highlighted in green, and long results are split into pages of 200 rows. The CSV export has one row per difference with the columns change, row_a, row_b (row numbers in each file, counting the header), every data column, and changed_columns; changed cells are written as old → new. It contains only the kinds of rows you have selected.
Both files are read with automatic delimiter detection (comma, semicolon, tab or pipe) and encoding detection, so a semicolon export can be compared with a comma one. To compare plain text instead, use the diff checker; for JSON, use JSON diff. To fix the differences you find, open the file in the CSV editor.