Skip to content
cosmodev ~/tools/csv-diff

Comparateur de CSV

Data & DevOps

Compare deux CSV par une colonne clé : lignes ajoutées, supprimées et modifiées, avec les noms des colonnes qui diffèrent. Les cellules entre guillemets contenant virgules, guillemets et retours à la ligne sont gérées. S'exécute localement dans ton navigateur, avec un lien partageable.

Liste des changements de lignes
La liste de lignes copiable apparaît ici.

(Documentation in English)

What it does

Compares two CSVs by key, like a database diff. Rows are matched on a key column (the first column by default, or any column you name); the tool reports rows added, removed and changed — a changed row names exactly which columns differ. Row order does not matter. Quoted cells are parsed per RFC 4180, so commas, escaped quotes and embedded newlines inside cells are handled correctly. Headers must match exactly; duplicate keys and ragged rows are rejected with the row number named. Everything runs locally in your browser.

How to use it

  1. Paste the original into Left CSV and the changed version into Right CSV, or tap Sample.
  2. Type a header name into Key column to match rows on something other than the first column. Leave it empty for the default.
  3. The row diff (right) shows green + added rows, red − removed rows, and accent ~ changed rows with the differing columns listed.
  4. Copy list takes a plain-text version of the diff for commit messages or review.
  5. Copy share link encodes both documents and the key column in the URL.

Examples

Given the sample, sku 1 changed price, sku 2 was removed, sku 4 was added:

~ 1 (qty) · − 2 · + 4

Row order never matters — two files with the same rows in different order diff as identical.

A quoted cell with a comma stays one cell:

1,"widget, large" and 1,"widget, large" — identical.

How keyed row diffing works

The tool builds a map of key → row on each side, then unions the keys:

Case Report
Key only on the right added row, full record shown
Key only on the left removed row, full record shown
Key on both, cells differ changed row, differing column names sorted
Headers differ error, both headers printed
Duplicate key on one side error, side and key named
Row with wrong cell count error, row number and counts named

Unlike positional JSON diffing, this is alignment by identity — rows can be reordered, sorted or filtered without producing noise. For document-shaped data without a key, use JSON Diff.

Code source13 languages

100% client-side · your data never leaves your browser. Found this useful? Share it with a teammate.