Compare two CSV files by key
Compare two CSV exports by a shared key column — id, email, or an order number — to see which rows are missing on each side, which values changed, and which keys are duplicated.
Open the tool, then paste the sample input below. Everything runs locally in your browser.
The problem
Comparing CSVs by row order is unreliable because sorts and inserts shift everything. Matching on a stable key column gives you an accurate picture: matched rows, changed cells, rows only in A, rows only in B, and duplicate keys.
Sample input
id,name,status
101,Asha,active
102,Ravi,inactive
103,Meera,active
id,name,status
101,Asha,active
102,Ravi,active
104,Kiran,active
Expected output
102 changed status: inactive -> active
103 only in A
104 only in B
101 unchanged
Row 102 matches on key but its status changed; 103 exists only in CSV A; 104 exists only in CSV B.
How to do it
- Paste or load CSV A.
- Paste or load CSV B.
- Select the key column, such as
id. - Run the comparison.
- Review missing, changed, matching, and duplicate-key rows.
Common mistakes
- Selecting the wrong key column.
- Ignoring duplicate keys, which inflate matches and hide changes.
- Leaving extra spaces in key values.
- Different column names for the key across the two files.
- Case-sensitive comparison of emails or codes.
Related tools
Related guides
FAQ
How do I compare two CSV files by ID?
Load both files, pick the id column as the key, and run the comparison to get matched, changed, only-in-A, and only-in-B rows.
Can I find rows missing from one CSV?
Yes. Rows present under a key in one file but not the other are reported as only-on-left or only-on-right.
Can I compare changed values?
Yes. For rows that match on the key, the tool highlights which columns changed and shows the before and after values.
What happens if keys are duplicated?
Duplicate keys are flagged. Resolve them first, because duplicates can inflate match counts and mask real differences.
Is CSV data uploaded to a server?
No. Parsing, joining, and diffing all happen in your browser.
CSV comparison runs locally in your browser. No file is uploaded.
Compare CSV files, find missing rows, clean lists and build SQL filters — grouped in one place.