mkdiff

Practical guides

How to compare two CSV files by rows and cells

Compare reordered CSV exports by a stable ID or composite key, ignore selected columns, and download an exact cell-level change report in your browser.

Updated 2026-10-20 · 6 min read

Compare CSV files by key →

The problem with CSV text diff

CSV files look like plain text, but the meaningful unit is usually a cell. A whole-line diff can show a row as changed without telling you which field changed.

This becomes confusing when rows contain many columns, quoted commas, empty cells, or exported spreadsheet data.

Compare reordered exports by key

Paste or choose both CSVs in the English CSV Diff tool, select comma, semicolon or tab, and click Load CSVs. Both inputs must have the same unique header names; column order can differ.

Choose By key columns and select a stable field such as id or sku. For stock exported by warehouse, use sku plus warehouse if sku alone repeats. Ignore optional fields such as exported_at only when those changes do not matter to your review.

  • Click Try reordered sample, then Compare CSVs with id selected.
  • Expect one changed, one added, one removed and one unchanged record; moving rows does not count as a change.
  • Inspect the original and updated record numbers and exact before/after values.
  • Copy or download the complete change CSV; the on-page table previews the first 200 cell differences.

Common mistakes

Do not treat a full row change as a full data change if only one field changed. Do not ignore empty strings, null-like values, or whitespace if the downstream system treats them differently.

Duplicate or blank keys stop key matching rather than silently dropping records. Add another key column or correct the data. Values remain exact and case-sensitive: 001 differs from 1, and 10 differs from 10.0. A changed key appears as a removal and an addition.

Use the change report

The report separates added, removed and changed cells and records the active matching and ignore rules. Presence flags distinguish an empty string from a missing record. A no-change comparison produces a header-only report.

Copied and downloaded CSV reports prefix formula-like spreadsheet cells with an apostrophe. The on-page values stay exact. Different schemas must be aligned before comparison; results over 50,000 cell changes or an 8 MiB report are blocked without a partial report.

FAQ

Why is text diff bad for CSV files?

A text diff treats each row as a line. One changed field can make the whole row look different, which hides the exact changed column.

Should I compare CSV by row number or by key?

Use row position only when both exports keep the same order. In the English CSV Diff tool, choose By key columns to match a stable ID even when rows or columns move. Select multiple columns when one field is not unique.

Can CSV comparison run in the browser?

Yes. The English CSV Diff tool reads pasted text or UTF-8 files locally, with a 2 MiB and 10,000-record limit per input. It does not upload CSV contents. Copy or download the cell changes after comparing.