Compare two CSV files

Compare two CSV files and report changed columns plus added, removed, and modified rows.

freeworks offlinenothing uploaded
ToolCSV Diff
Input
Output

How it works

Both files are parsed, headers are compared as sets, and rows are matched by position or an optional key column. Common fields are compared as values and only a capped detail list is emitted.

  • Position matching is the least-assumptive default.
  • The 100-detail starting cap keeps a large diff readable.

Worked example

Compare user lists by ID column
Detect added, removed, and modified rows between two CSV versions using the id column as key
Input
											Input1: id,name,email,role
1,Alice,[email protected],admin
2,Bob,[email protected],editor
3,Carol,[email protected],viewer
Input2: id,name,email,role
1,Alice,[email protected],admin
2,Bob,[email protected],admin
4,Dave,[email protected],editor
										
Output
												Row  Type      Data                                                                 Changes
---  --------  -------------------------------------------------------------------  ---------------------
1    modified  {"id":"2","name":"Bob","email":"[email protected]","role":"admin"}     role
2    modified  {"id":"4","name":"Dave","email":"[email protected]","role":"editor"}  id, name, email, role
											

When to use this

Migration checks compare exports, QA reviews changed prices, and keyed customer reports find overnight additions.

Edge cases

  • Reordered rows look modified without a stable key column.
  • A quoted newline stays inside one record after parsing.
  • Only the first maxDetails entries are shown even when aggregate counts are larger.

References