Compare two CSV files by a unique key

Find added, removed and modified CSV rows locally. Match a single or composite key, reject ambiguous duplicates and export a report with before/after values.

Data Workspace

Local tables. Clear decisions.

On your device
Drop CSV, TSV or JSON files here.
Import settings & limits

Settings apply to newly added CSV/TSV files. Up to 8 sources; 8 MiB per file, 24 MiB total source bytes; 50,000 rows, 100 columns and 500,000 cells per table; 1,000,000 source cells in total. No XLSX support. JSON must be a flat object array.

Compare files

Compare before and after by a non-empty unique key. Duplicate keys stop the comparison; no row is guessed or silently paired.

Unique key columns (combine if needed)

To try the examples, first remove duplicate IDs from people-before.csv and export it; import that cleaned file as Before. Then compare it with people-after.csv using id. Added or removed columns are reported as schema changes.

A clearer view starts with one table.

Add a CSV or TSV, or try three examples. Your input stays in this tab. No account, upload or spreadsheet installation.

A reproducible example.

Input

Before
id,status
001,draft
002,ready

After
id,status
001,ready
003,draft

Expected output

Modified: 001, draft → ready
Removed: 002
Added: 003

Steps to follow.

  1. Import the before and after CSVs, then select Compare files.
  2. Choose each file explicitly. Select id as the unique key; combine columns only when needed to make the key unique.
  3. Compare & preview report. The example reports one modified, one removed and one added row.
  4. Export CSV or JSON. Inspect change, key, changed_columns and paired before:/after: columns.

Formats, matching and limits.

Keys must be non-empty and unique in each input. Comparison uses exact text, including whitespace, case and leading zeros. Reports support at most 48 distinct input column names because they include paired values. Added and removed columns are reported as schema changes; a missing column differs from an existing empty cell.

All processing happens in your browser. Use file selection and downloads in a modern Chrome, Edge, Firefox or Safari. Source files stay unchanged; leaving or reloading clears the temporary data session.

Problems worth checking.

A duplicate-key error stops the comparison.

Deduplicate the source deliberately or choose a composite key. The comparison never picks an arbitrary row.

001 and 1 do not match.

They are different strings. Correct identifiers in your source only if that reflects the real data.

Every row changed after adding a column.

A new or removed column is a real schema difference. Check the schema summary and the changed_columns JSON list.

Related next steps.

Read the complete practical guide