Compare two CSV files and find the differences

Give each row an identity with a key column such as ID or email. The comparator then lists rows that exist only in file A, rows that exist only in file B, and rows whose other columns changed, showing the old and new value side by side.

CSV Comparator tool

Your file stays in this browser tab. It is not uploaded by SheetShift.

File A (older or original)

Drag a file here, or

File B (newer or other)

Drag a file here, or

Options

How to use the CSV Comparator

  1. Load file A and file B.
  2. Enter the key column, a column whose value is unique per row, such as id or email.
  3. Press Compare. The result counts rows only in A, only in B, changed and identical.
  4. Review the lists on the page or download the report as CSV.

Example: input and output

This example was produced by the same code the tool runs, with these settings: key = id, trim = true. You can download the sample file(s): file-a.csv, file-b.csv.

Input
# file-a.csv
id,name,city
1,Ann,Austin
2,Ben,London
3,Cy,Sydney

# file-b.csv
id,name,city
1,Ann,Austin
2,Ben,Leeds
4,Dee,Toronto
Output
status,key,column,file_a_value,file_b_value
only_in_A,3,,,
only_in_B,4,,,
changed,2,city,London,Leeds

Result summary: 1 row only in A, 1 row only in B, 1 row changed, 1 row identical.

Supported formats

CSV, TSV, TXT. The two files may use different delimiters; only columns present in both are compared for changes.

Limitations

  • A key column is required. Without one, rows cannot be matched reliably.
  • If a key appears more than once in a file, only its first row is compared and you get a warning.
  • The tool compares cell text, so 1.0 and 1 count as different values.
  • Column order does not matter; column names are matched ignoring case.

When this helps

Spot what changed between two exports

Compare last week's customer export with this week's to see new customers and edited emails.

Check a migration

Compare data exported from the old and new system by order ID to find rows that were lost or altered.

Frequently asked questions

What is a key column?

A column that identifies a row, like an order number. Rows from the two files with the same key are treated as the same record.

Can I use more than one key column?

Yes. Enter several column names separated by commas, for example "country, id".

Does it show which cells changed?

Yes. Changed rows list each column with the value from file A and from file B.

Related tools

Guides: How to compare two spreadsheets and find what changed

Category: Data Comparison