Compare two CSV files
Added, removed, changed, matched on a key rather than line by line.
- Added, removed, changed
- Matched on a key column
- Field-level change list
- Nothing uploaded
1.Open both files
The old file
CSV or TSV. Drag it here, or choose a file.
The new file
CSV or TSV. Drag it here, or choose a file.
Why it exists
A text diff on two CSVs tells you that line 4,912 changed, which is almost never the question. The question is which records are new, which are gone, and which ones changed and in what field. That needs a key column to match rows across the two files, so this asks for one and then answers in those terms.
What it does
- Takes an old file and a new file and matches their rows on a key column you pick.
- Reports rows only in the new file, rows only in the old file, and rows present in both whose values differ.
- For a changed row, names the columns that changed and shows the old and new values.
- Ignores row order entirely, so a file that was merely re-sorted shows no changes.
Choosing a key
The key is whatever makes a row identifiable across both files: an ID, an email address, a SKU, or two columns together. If the key repeats within a file, comparison is ambiguous and the tool says so rather than picking one.
Questions
- Why does it need a key column?
- Without one, the only thing two files can be compared on is position, and a single inserted row at the top then reports every subsequent row as changed. A key makes the comparison about records rather than line numbers.
- Does the column order have to match between files?
- No. Columns are matched by name, and a column that exists in only one file is reported as such rather than treated as a change on every row.
- What if the key is not unique?
- The tool tells you which key values repeat and stops. With duplicate keys there is no single correct pairing of old rows to new ones, and guessing would produce a confident, wrong diff.
The longer answer
This page does the job. The guide explains it — including the parts a tool cannot decide for you.
How to compare two CSV files and find what changeddiff compares lines, so a re-sorted export looks entirely rewritten. Here is how to compare by key instead: what is new, what is gone, what changed.The other tools
- Open a CSV file onlineDrop a file in. It opens in your browser, and it stays there.Open it
- Run SQL on a CSV fileReal SQL, on your file, without installing a database.Open it
- Merge CSV files into oneSeveral files in, one file out, columns matched by name.Open it
- Remove duplicate rows from a CSVDuplicates on the columns you say identify a row.Open it
- Convert a CSV to PDFA CSV, laid out as a readable table, saved as a PDF.Open it
- Convert a CSV to ExcelA real .xlsx, with nothing in it changed on the way.Open it
- Convert a CSV to JSONEvery row an object, every header a key.Open it
- Convert JSON to CSVA tree, flattened into a table you can open anywhere.Open it
- Convert Excel to CSVEvery sheet of a workbook, out as clean UTF-8 CSV.Open it
- Split a CSV fileOne file too big to use, as several that are not.Open it
- Clean up a messy CSVGermany, germany and “Germany ” become one value again.Open it
- Convert a CSV to SQL INSERT statementsA CSV in, a .sql script any database will run.Open it
- Format and validate JSONValid JSON, pretty. Broken JSON, located and mostly fixed.Open it
- View JSON as a tree or a graphThe shape of a JSON document, before you read a line of it.Open it
- Turn a Markdown outline into a mind mapType a list. See a map.Open it
- Make a printable 30-day challenge trackerThirty boxes per habit, on paper, where you will see them.Open it
- Reverse a videoPlay it backwards, sound and all, without uploading it.Open it