← All tools

COMPARISON / CSV ↔ CSV

CSV Compare by Key

Compare two CSV files by an ID or another shared key. Find added, removed and changed records without uploading your files.

Your browser is the workspace
CSV
UTF-8 · Up to 5 MB
CSV
UTF-8 · Up to 5 MB
Use a unique column, such as an ID.

How to compare two CSV files by key

Paste or open both UTF-8 CSV files and choose a shared key. Optionally enable Ignore Case (Keys) or Trim Whitespace (Keys), then select Compare files. Added means only in updated; removed means only in original. Filter the computed table by status without changing counts or the full download.

Input limits

Use up to 5 MB per CSV. Headers and keys must be non-empty and unique. Keys must also remain unique after enabled key options are applied. Other columns are compared literally; malformed CSV is rejected and header-only input is valid.

CSV comparison example

Original CSV
id,name
001,Alex
002,Sam
003,Jamie
Updated CSV
id,name
001,Alex Chen
002,Sam
004,Taylor
Result with id as the key
Added: 1
Removed: 1
Changed: 1
Unchanged: 1
Original CSV with case and spaces in keys
id,name
ABC123,Alex
" XY-2 ",Sam
Updated CSV with case and spaces in keys
id,name
" abc123 ",Alex
xy-2,Sam Lee
Exact key matching (both options off)
Added: 2
Removed: 2
Changed: 0
Unchanged: 0
Ignore Case (Keys) + Trim Whitespace (Keys)
Added: 0
Removed: 0
Changed: 1
Unchanged: 1

Frequently asked questions

Do key options change my CSV values?
Both options start off. Ignore Case matches keys such as ABC123 and abc123; Trim Whitespace ignores outer key spaces. Enable either or both. Only key matching is normalized: other fields stay case- and whitespace-sensitive, and 001 remains different from 1. Matching key spelling changes alone do not create differences. Results use the original Updated CSV key, or the Original CSV key for removed rows.
Why are empty or duplicate keys rejected?
Every key must identify one row in each file. Empty and whitespace-only keys are rejected, as are duplicates created by enabled key options; the error identifies Original CSV or Updated CSV. Row and column order do not matter. Added or removed columns still count as changes for matching records, even for empty cells; missing and empty are different.
Does filtering change Download Results or the counts?
No. The table shows the first 100 differences for All differences, Added, Removed or Changed, with a shown/total count for that selection. Filtering uses the computed result; overall counts stay fixed and Download Results exports every difference regardless of the filter. Unchanged rows are excluded; identical inputs produce a header-only report. Editing input, key or key options clears results and resets the filter.