Skip to content
cosmodev ~/tools/csv-diff

Comparare CSV

Data & DevOps

Compară două fișiere CSV după o coloană cheie: rândurile adăugate, eliminate și modificate, cu numele coloanelor care diferă. Celulele între ghilimele cu virgule, ghilimele și rânduri noi sunt gestionate corect. Rulează local în browserul tău, cu un link partajabil.

Lista modificărilor rândurilor
Lista de rânduri care poate fi copiată apare aici.

(Documentație în engleză)

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.

Cod sursă13 limbi

100% pe partea clientului · datele tale nu părăsesc niciodată browserul. Ți s-a părut util? Partajează-l cu un coleg.