Compare CSV Files by Key
Match unique identifiers across exports and review added, removed and changed records with per-field differences.
Upload both exports and enter a shared unique key column.
A clear result starts here
Run the tool to see your output here.
Try the example to explore how it works.What to know about this tool
10 MB, 50,000 rows and 200 columns per input; complete report capped conservatively at 20 MB and 50,000 field differences. Unique nonblank headers/keys, matching column names and rectangular CSV required. Values stay strings; no fuzzy matching, XLSX or formula evaluation.
Instructions and examples
From input to output
- Choose the first and second CSV exports, or paste each.
- Enter the shared Unique key column and review formula protection. Leave the key blank only if the first column is the intended ID.
- Select Compare CSV files and inspect added, removed, changed and unchanged counts, then download the difference CSV.
Settings and result behavior
- Both files need the same exact column names, but column order may differ. Keys must be unique and nonblank in each file.
- Values compare as exact strings; spaces and case matter. There is no fuzzy identity matching or formula evaluation.
- Formula protection defaults on and alters potentially executable export cells with an apostrophe.
A worked example
- Input
First: id,name 001,Ada 002,Lin Second: id,name 001,Ada 002,Lin updated 003,Sam
- Settings
- Unique key column: id; formula protection on.
- Expected result
1 added, 0 removed, 1 changed and 1 unchanged record. ID 002 shows the name field change.
Supported input and limits
Choose a UTF-8 CSV, TSV or TXT file, or open “Paste CSV instead”. Use comma, semicolon, tab or pipe separators. A header row with unique nonblank names and the same field count on every row is required. Each input has its own file/paste area and delimiter setting. Leave either delimiter blank to detect that source independently.
10 MB, 50,000 rows and 200 columns per input; complete report capped conservatively at 20 MB and 50,000 field differences. Unique nonblank headers/keys, matching column names and rectangular CSV required. Values stay strings; no fuzzy matching, XLSX or formula evaluation.
If the result is unexpected
- For duplicate keys, choose an actually unique column rather than deleting records just to silence the error.
- If a large report hits its output cap, compare smaller subsets while retaining the same key convention.
Check before using the result
Spot-check changed IDs against both sources. The table is a sample; download contains the complete accepted report, not a merged dataset.
Report a problem with this tool. Include a nonsensitive example and your browser details.
Questions about this tool
What makes a good CSV comparison key?
Use a stable, nonblank identifier that is unique in both files. Duplicate keys are rejected. Headers must have matching names, but records can appear in a different order. Values are compared as strings, without fuzzy matching.
Practical guides
- Compare Two CSV Exports Using a Unique Key
Match CSV records by a stable identifier and distinguish added, removed and changed rows from simple row-order differences.
- Clean a CSV While Preserving Leading-zero Identifiers
Trim cells and headers, remove exact duplicate rows and inspect identifiers before importing a cleaned CSV into a spreadsheet.