Skip to content
cosmodev ~/tools/csv-diff

Sammenlign to CSV-filer via en nøkkelkolonne: rader som er lagt til, fjernet og endret, med navn på kolonnene som skiller seg. Siterte celler med kommaer, anførselstegn og linjeskift håndteres riktig. Kjører lokalt i nettleseren din, med en delbar lenke.

Radendringsliste
Den kopierbare radlisten vises her.

(Dokumentasjon på engelsk)

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.

Kildekode13 språk

100 % på klientsiden · dataene dine forlater aldri nettleseren. Nyttig? Del det med en kollega.