Compare CSV Files

Find added, removed, and changed rows between two CSV files by a shared key column.

What Compare CSV Files helps you do

Comparing two exports by eye misses small cell changes. This tool matches rows by a key column, reports added and removed rows, and lists every changed cell with before and after values. It is built for reviewing vendor updates, CRM exports and migration results before the new file replaces the old one.

Both files are parsed and compared in your browser. Nothing is uploaded to Haivix.

How it works

Both files are parsed and their headers matched by name, so column order does not matter. In key mode each row is indexed by the selected key and matched across files; in row-order mode rows are paired by position. Changed cells are recorded with their original and new values, and the report is serialized as CSV.

How to use Compare CSV Files

  1. Drop the before and after CSV files into the two upload areas.
  2. Choose the key column and whether to ignore case or trim whitespace.
  3. Compare the files, review the summary and difference table, then download a report.
  4. If a key is duplicated or empty, fix the source and run the comparison again.

When to use it

  • Check what changed between two database or CRM exports.
  • Review a vendor price list or inventory update before accepting it.
  • Confirm that a migration produced the expected rows and values.
  • Compare a filtered export with the full source.
  • Check that a manual edit changed only the intended cells.
  • Review a translated data file against the original values.

When not to use it

  • Do not compare files without a header row; columns are matched by name.
  • Do not use key mode when the key is not unique and non-empty.
  • Do not expect formatting, comments or row colors to be compared.

Example

A 12,000-row product export is compared with last month's file by SKU. The report shows 18 changed prices, 2 removed rows and 1 added row. The buyer filters the changed cells, approves the increases, and the old file is archived.

What you can do with Compare CSV Files

  • Compare two CSV or TSV files with a header row.
  • Match rows by a key column or by row order.
  • Ignore case and trim whitespace when comparing values.
  • Report added, removed and changed rows.
  • Show before and after values for each changed cell.
  • Download a CSV report of the differences.

Example: review a vendor price update

Load the old and new price lists and choose SKU as the key column. If the SKU is not unique, the comparison stops and the key needs cleaning first.

Enable trim whitespace so a trailing space does not appear as a price change. Review the changed cells, not just the counts.

Download the report and send the changed rows to the buyer for approval before replacing the master list.

What to know before you start

  • Both files need a header row. Key mode also needs a key column that is unique and non-empty.
  • Rows are matched by key or row order; a changed key appears as one added and one removed row in key mode.
  • Column order does not matter, but duplicate header names are not supported.
  • Formulas, formatting, comments and charts are not compared.
  • The comparison is limited by browser memory and the per-file cap.

Common mistakes

  • Choosing a key column with duplicate values.
  • Leaving trailing spaces in one file and reading every row as changed.
  • Using row-order mode after sorting one file.
  • Ignoring added and removed rows because the changed-cell count looks small.
  • Comparing files with different header spellings and getting mostly blanks.

Troubleshooting

If the comparison refuses to start, the key column has duplicates or empty values. Clean it and try again.

If almost every row is reported as changed, check for whitespace, case or a different date format between the files.

If columns are missing, compare the header rows; a renamed column is treated as a different column.

If row-order mode produces nonsense, the files were sorted differently. Switch to a key column.

If the report is huge, filter the changed cells in a spreadsheet to find the meaningful changes.

If a key changes between the two files, key mode reports the old row as removed and the new one as added. Confirm whether the key itself changed before treating the pair as a real delete and insert, especially when the key is an email or an account number.

If the files use different date or number formats, normalize the values before comparing; a date written as 2026-01-02 and 01/02/2026 is a real string difference even when both mean the same day.

Related standards and documentation

  • RFC 4180 describes the CSV format and its quoting rules.
  • TSV follows the same row-and-header model with tab separators.
A key makes the diff trustworthy
  • Use a unique, non-empty key column.
  • Trim whitespace before comparing.
  • Review added and removed rows too.

Frequently Asked Questions