CSV Diff

Compare two CSV files by a key column. The tool reports added rows, removed rows, and changed rows with column-by-column highlighting. Useful for comparing data exports, spotting drift between two sources, or reviewing the impact of a data migration.

How to use the CSV Diff

Paste both CSVs (must have a header row). Set the key column name — the tool matches rows between CSVs by this column. Output shows added rows (in B not A), removed (in A not B), and changed (key matches, other columns differ) with per-column highlights.

Diffing two CSV files by key

A plain text diff of two CSV exports is almost useless: reorder the rows, add a column, or re-quote a field and every line looks changed, even when the underlying data is identical. What you usually want is a row-level comparison — which records were added, which were removed, and which changed — matched by a stable identifier rather than by line position.

This compares two CSVs on a key column and reports added, removed, and changed rows, highlighting exactly which cells differ in the rows that moved. It works on tabular CSV; to compare two JSON documents structurally instead, the JSON patch tool produces an RFC 6902 diff, and to combine two datasets rather than contrast them, the JSON + CSV merger joins them on a shared key.

Common use cases

  • Review a data export — see what changed between yesterday’s and today’s dump.
  • Check a migration — confirm a transform added and changed only the rows you expected.
  • Find drift — spot where two sources that should agree have diverged.
  • Audit edits — identify exactly which cells a colleague changed in a shared sheet.
  • Ignore row order — match by key so reordered rows are not reported as changes.

Frequently asked questions

How are rows matched between the two files?

By the key column you name — rows with the same key are compared, so row order and reordering do not matter.

What counts as a changed row?

A row whose key exists in both files but where one or more other columns differ; the differing cells are highlighted.

What if the two files have different columns?

Columns present in one file but not the other are shown as added or removed fields alongside the row-level differences.

Can it compare JSON instead?

For structural JSON comparison use the JSON patch tool, which emits an RFC 6902 diff.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: