CSV Diff
Match records by a shared column, even when rows move.
Use a shared column. Row order does not matter.
Add both CSV files to start comparing. Compares automatically as you type.
Differences
Previous result — out of date. Exports are unavailable until the comparison is up to date.
Add both CSV files to see their differences.
Paste data above, open local files, or try the example.How matching works
Rows are matched by the shared column you choose. Reordering rows does not create a difference. Each changed field is reported separately; added and removed rows include every named field. Duplicate keys keep their first occurrence.
Open UTF-8 CSV files up to 50 MB each. All processing stays in this browser. Larger text waits for Run so typing stays responsive.
Your text stays in this page. Usage analytics are enabled. Privacy details.
How to use CSV Diff
- Prepare two comma-separated CSV exports with a header row and unique, non-empty column names. Paste the earlier version into Original CSV and the later version into Changed CSV.
- After adding both files, choose a stable shared column such as id from Match rows by. The first shared column is selected initially. Check that every record has a non-empty, unique key. If your selected column disappears after an edit, choose another shared column before continuing.
- Leave Case-insensitive keys off unless A and a identify the same record. This option affects key matching only; cell values still compare case-sensitively. Trim cell whitespace applies to headers and every cell.
- Results update after typing; for very large inputs, select Run. Check Duplicate keys skipped: only the first record for each matching key is compared. Resolve duplicate or missing identifiers in the source exports before treating the result as a complete comparison.
- Review changed, added and removed rows, changed cells and any column changes. Added records occur only in Changed CSV; removed records occur only in Original CSV. Check Before and After, then select Copy report or Download CSV for the full difference report.
Input and output examples
Match inventory records by ID even when rows move
Choose id in Match rows by. B only changes position and produces no difference. A changes stock from 8 to 11 and its note from Standard to Restock confirmed for October. C is added and D is removed: 1 changed row, 2 changed cells, 1 added row and 1 removed row, reported as 4 entries.
Original CSV
id,item,stock,note
A,Tea,8,Standard
B,Coffee,4,Standard
D,Milk,2,SeasonalChanged CSV
id,item,stock,note
B,Coffee,4,Standard
A,Tea,11,Restock confirmed for October
C,Cocoa,6,New supplierOutput
Type,Key,Column,Before,After
changed,A,stock,8,11
changed,A,note,Standard,Restock confirmed for October
removed,D,,"{""id"":""D"",""item"":""Milk"",""stock"":""2"",""note"":""Seasonal""}",
added,C,,,"{""id"":""C"",""item"":""Cocoa"",""stock"":""6"",""note"":""New supplier""}"How this tool works
Both inputs need unique column names. Quoted commas, quotes, and multiline cells are supported. Reordered rows match by key; duplicate keys keep the first row and report skipped counts. Missing columns are listed once. The preview shows up to 5,000 report entries. Copy report and Download CSV include all calculated differences and are unavailable while input is incomplete, updating or invalid.
Input and output stay in the current page. Refreshing or closing the page clears them. For very large inputs, use Run to start processing; a task that takes too long is stopped so you can change the input.
Frequently asked questions
Which column should be the key?
Use a stable unique identifier present in both files. If the key value changes, the record appears as a removal and addition.
Does key matching ignore cell differences?
Case-insensitive matching affects keys only. Other cell values remain case-sensitive; optional trimming applies to every cell.