1001Ferramentas
🔀 Converters

CSV Diff by Key Column

Compares two CSV files by a key column and lists added, removed and changed rows, pointing out exactly which columns differ.

Everything runs inside your browser: the two files are never uploaded and no request leaves this page.

How the comparison works

Rows are matched by the key column, never by position, so reordering a spreadsheet does not show up as a difference. A key found only in A is reported as removed, one found only in B as added, and a key present in both with at least one different cell is reported as changed, cell by cell.

Two habits save time here: check the warnings box before trusting the score, because a duplicated key means only the last occurrence was compared; and turn on trimming when one of the exports comes from a spreadsheet, where a trailing space in a code turns a match into a false added/removed pair.

Comparing two CSV exports by key column

You exported the stock report on Monday and exported it again on Friday. Now you have to tell the team what moved, and opening both files side by side only works while there are twenty rows. This tool matches rows by a key column (product id, SKU, customer number) and returns four lists: what stayed the same, what changed, what came in and what went out, pointing at the exact cell that differs.

The comparison never looks at row position. If Friday's file came sorted by name and Monday's by code, the answer is the same, because reordering a spreadsheet is not a content difference. The trap is the repeated key: when the same id shows up twice, only the last occurrence is compared, and the warning box tells you which lines held it so you can judge whether the export duplicated records.

The delimiter is found by counting commas, semicolons, tabs and pipes outside quotes on the first line, so a semicolon-separated export works with no setup. Quoted fields containing commas, doubled quotes and line breaks inside a field follow RFC 4180. Nothing is uploaded: the pasted text lives in this browser tab and disappears when you close the page.

Frequently asked questions

What happens when the key column has duplicate values?
Rows are indexed by key and the last occurrence of each value wins, which matches how people read an export as a final state. Every repeated key is listed in the warnings box with its line numbers, so you can check whether the export duplicated records before trusting the score.
Do both files need the same set of columns?
No. Columns that exist in only one file stay out of the cell by cell comparison and are listed in the warnings as a structure mismatch. When that difference is expected, such as a new audit column, tick the option to ignore extra columns and the warning becomes informational only.
Can I compare two Excel sheets?
Save each sheet as CSV, or copy the cells and paste them straight into the boxes, and the comparison works the same way. Keep trimming enabled: spreadsheet cells often carry an invisible trailing space in a code, and without trimming that single space turns a matching row into a false added and removed pair.

Related Tools