Skip to content
Jellykit

CSV Diff

Compare two versions of a CSV table by a key column and list the rows added, the rows removed and every changed cell.

  • Runs on your device
  • Works in the background
Loading tool

About CSV Diff

When last month’s export and this month’s look almost the same, a line-by-line text diff is little help: one reordered row and everything seems to change. This tool matches rows by a key, such as an id column, so the order of rows and of columns does not matter, and reports exactly which rows appeared, which disappeared and which cells changed, with the value before and after.

With no key named, the tables are compared row by row. The full list of changes can be downloaded as a CSV report.

How it works

  1. Both tables are read as RFC 4180 CSV, so quoted fields with commas and line breaks are understood. Each table’s delimiter is detected on its own unless you choose one.
  2. Rows are matched on the key columns. A key that appears on several rows is matched in the order the rows appear. Without a key, the first row is compared with the first row, and so on.
  3. Columns are matched by their header names, so a column that moved is still compared. Columns that exist in only one table are listed but not compared.
  4. Cells are compared as text, exactly, unless you choose to ignore case or the spaces around values. 1.0 and 1 count as different.

Questions

Why does every row show as changed?

Probably no key was named, and a row was inserted near the top, so every later row is compared with its neighbour. Name the column that identifies a row, such as id, and rows are matched by it instead.

How many changes are shown?

All of them are counted. The table on the page shows the first 500; the downloaded report lists every one, with the change, the key, the column and the values before and after.

Can it compare tables whose columns are in a different order?

Yes. With a header row, columns are matched by name. Without one, they are matched by position.

How large can the tables be?

Up to 5 MB each. The comparison runs in the background in this browser tab; nothing is uploaded.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.