DiffKit / CSV compare

CSV compare

Drop two CSV exports and choose the column that identifies a row. You’ll see which records were added, removed or edited, down to the individual cell.

5 lines
5 lines
Loading…

How the CSV comparison works

Each file is parsed following RFC 4180, the common CSV format: quoted fields may contain commas, quotes (written as "") and line breaks. Rows are matched on the key column you choose. A key found only in the original is removed, a key found only in the new file is added, and a key in both with any different cell is changed, with the old value struck through next to the new one.

In the example, keyed on sku, you can see at once that the Oak shelf was delisted, a Monitor arm was added, and the desk price and stock changed. A plain text diff would show the same edits as a jumble of shifted lines.

For a simple one-column list, such as emails or IDs, the list comparison is faster.

Questions people ask

Why match rows by a key column?

If a row is inserted near the top of a spreadsheet export, a line-by-line diff reports every row after it as changed. Matching on an ID column such as SKU, email or order number lines up the same record in both files wherever it sits, so you see only genuine additions, removals and cell edits.

Which delimiters are supported?

Commas, semicolons (common in European Excel exports), tabs and pipes. The delimiter is detected separately for each file, and quoted fields with commas or line breaks inside them are parsed correctly.

Can I compare two Excel sheets?

Yes. In Excel, Google Sheets or Numbers, save or download each sheet as CSV, then drop both files here. Formulas are exported as their calculated values.

What if a key appears twice?

The last row with that key in the changed file is used for matching. If your data has no unique column, switch to “Row number” matching.

Other comparisons