Skip to the tool
ViewCSV
Files stay on your device

Compare CSV files

Original file
orders.csv· SAMPLE DATA15 rows · 8 columns
Updated file
orders-updated.csv· SAMPLE DATA15 rows · 8 columns
Match rows
Key columns
Columns that identify a row in both files, like an order number.
Columns to ignore
  • Rows: 1 added, 1 removed, 1 changed, 13 unchanged. Changed values: 1.
  • 1 key appears more than once (first: 001043). Repeats are paired in order.
  • Changed001044original row 4 updated row 4
    quantity512
  • Removed001046original row 6
  • Added001099 updated row 15

The download has one line per changed value, plus added and removed rows.

Open the original file and the updated file, choose the column that identifies a row, such as an order or SKU number, and the differences appear at once: rows only in the updated file are added, rows only in the original are removed, and rows in both with different values are changed, showing each before and after value. Rows can move anywhere in the file without counting as a change. Download the result as a CSV report with one line per changed cell. Both files are compared in your browser and never uploaded.

How to compare two CSV files

  1. Open the original file in the first slot and the updated file in the second. Each slot has its own import settings for delimiter, header and encoding, so a semicolon export can be compared with a comma one.
  2. Match by key and tick one or more key columns from the columns both files share. Use several columns when no single one is unique, such as order_id and line.
  3. Set any comparison options, review the summary and the list of differences, filtered to added, removed or changed if you like, then download the change report.

Match by row position instead when the files have no ID column and the rows are known to be in the same order: row 1 is compared with row 1, and so on. A single inserted row then makes every row after it look changed, so use a key whenever you have one.

Comparison options

Ignore caseDesk Lamp equals desk lamp. Applies to key columns as well as values.
Ignore whitespaceTrims spaces at both ends and treats any run of spaces, tabs or line breaks inside a value as one space before comparing. Also applies to keys.
Numeric toleranceWhen both values are numbers, they count as equal if they differ by at most this amount, such as 0.01. The arithmetic is exact decimal, not floating point, and a tolerance of 0 treats 45.0 and 45.00 as the same number. Values are numbers only when written with a dot decimal and no thousands separator: 1,000 stays text, while 1e3 is read as 1000. A tolerance also makes 007 equal 7, since both read as numbers. Leave the field empty to compare text exactly.
Ignore columnsColumns left out of the comparison entirely, such as updated_at or an export timestamp that changes every time.

Columns that exist in only one file are listed in the summary and not compared. Rename them with Map CSV columns if they are the same column under a new name.

Duplicate and blank keys

A key should identify one row. When it doesn't, nothing is hidden: the summary counts the repeated keys and names the first one, and the rows that share a key are paired in order of appearance. The first original row with key 1 is compared with the first updated row with key 1, the second with the second, and any extra rows on either side are reported as removed or added.

That pairing can report a change that is really a reordering of two rows with the same key. If the summary mentions duplicate keys, add another key column until each combination is unique. Rows whose key columns are all empty are counted separately, because they usually come from blank lines or a broken export.

Reading the results and the report

The summary gives the number of added, removed, changed and unchanged rows and the total number of changed cells. The list shows the differences in original-file order, followed by rows that exist only in the updated file. Each one shows the key and the row number in each file, counting data rows from 1 without the header. The page lists the first 500 differences; the report contains all of them.

changeadded, removed or changed.
Key columnsThe key value. With ignore case or ignore whitespace on, the key is shown as compared, in lower case or trimmed. When matching by position, a single row column holds the row number.
original_row, updated_rowData row numbers in each file; empty for the side where the row doesn't exist.
column, original_value, updated_valueOne line per changed cell. Empty for added and removed rows, which take one line each.

The report is a UTF-8 CSV named after the updated file, for example feb-changes.csv. Open it in the CSV viewer to sort or search the changes.

Troubleshooting

  • Every row shows as added and removed. The key values are written differently in the two files, for example 00123 against 123 or a trailing space. Turn on ignore whitespace, or fix the column in Clean CSV. Leading zeros always count in keys, because keys are compared as text.
  • Numbers that are equal show as changed. 45.00 and 45.0 are different text; enter a tolerance such as 0 or 0.005 to compare them as numbers. Numbers with a decimal comma or thousands separators are always compared as text.
  • A key column is missing from the list. Only columns present in both files can be keys, and names must match exactly. Check the import settings if the whole header arrived as one column.
  • Every row after a certain point is changed. You are matching by position and a row was inserted or deleted. Switch to match by key.

Limits and privacy

Each file can be up to 25 MB, 100,000 rows, 250 columns and 2 million cells. Comparison is not streamed: both files are held in memory, and the differences update as you change options.

The files are compared in your browser and never sent to a server. To combine the two versions instead, use Merge CSV files; to check one file against rules, use Validate CSV.

Example

Two product lists keyed by sku, compared with the default exact settings. The rows are in a different order, which doesn't matter. With ignore case and whitespace on and a tolerance of 0.001, only the stock change on 00456 remains.

CSV
jan.csv (original)
sku,name,price,stock
00123,Desk lamp,19.90,4
00456,Shelf,45.00,2
00789,Stool,12.00,9

feb.csv (updated)
sku,name,price,stock
00456,Shelf,45.0,0
00123,Desk Lamp ,19.90,4
01010,Bench,80.00,1
feb-changes.csv
change,sku,original_row,updated_row,column,original_value,updated_value
changed,00123,1,2,name,Desk lamp,"Desk Lamp "
changed,00456,2,1,price,45.00,45.0
changed,00456,2,1,stock,2,0
removed,00789,3,,,,
added,01010,,3,,,

Questions and answers

Does the order of rows matter?

Not when you match by key: rows are found by their key wherever they are in each file. Order only matters when you match by row position.

Which file should be the original?

The older one. Rows only in the second file are reported as added and rows only in the first as removed, so swapping the files swaps those two lists and the before and after values.

Can I compare columns with different names?

Only columns with the same header in both files are compared, and both files must use the same name for each key column. Rename the columns in one file with Map CSV columns first.

Standards and references