Compare CSV Files

Diff two CSV files in your browser: rows matched by key or aligned without one, changed values old → new, added, removed and moved rows. No upload.

About this tool

A real diff for CSV files, row by row and cell by cell

A text diff of two CSV files breaks as soon as a row is inserted or the file is sorted differently. Toolula reads both files as tables — delimiter, encoding, decimal commas and dates detected — matches rows by their key column (or aligns them by content when there is none) and compares each value by its meaning, so “1.234,50” in a German export equals “1234.5” in an English one. The result lists changed, added, removed and moved rows with every changed cell's old and new value.

Any CSV dialect

Comma, semicolon, tab or pipe; UTF-8, UTF-16 or Windows-1252; decimal commas and German or US dates are detected per file, so two exports from different systems compare value by value.

Diff with or without a key

With a key, rows pair up regardless of order. Without one, rows are aligned like a text diff and moved rows are recognised instead of being shown as removed and added.

Columns matched for you

Columns are paired by name regardless of order; renamed columns (Qty → Quantity, unit_price → price) are recognised by their names and shared values, and new or removed columns are listed instead of breaking the comparison.

Rules for what counts

Ignore upper/lower case, extra spaces, empty versus missing cells, number formats (1.234,50 = 1,234.50), date formats (31.12.2024 = 2024-12-31), chosen columns, and numbers within an absolute or percentage tolerance.

An Excel report to send on

Summary, changed rows with the changed cells highlighted (old line above new), a filterable change list with differences in numbers and percent, added and removed rows — plus the change list or the new version with a change flag as CSV, Excel or Parquet.

Nothing leaves your device

Both files are read by a database engine (DuckDB, compiled to WebAssembly) inside your browser tab. No upload, no account — price lists, customer data and payroll exports stay on your computer.

Why a text diff fails on CSV

Line-by-line diff tools treat a CSV as text. That breaks in three common ways, all of which this comparison handles:

Sorted differently

One system exports by date, the other by customer: a text diff shows every line as changed. Pairing by a key column ignores the order completely.

Different notation

A German export writes 1.234,50 with semicolons, an English one 1234.5 with commas. Each file is read with its own delimiter, encoding and number format, so equal values compare as equal.

One changed field in a long row

A text diff marks the whole line. Here the row is shown with only the changed cell highlighted, old value above new, and a filter shows the changes of one column at a time.

How rows are paired

A comparison is only as good as its pairing: if row 12 of the old file is compared with row 12 of the new one, a single inserted row turns everything below it into a difference. So the tool first works out which row belongs to which.

A measured key

Every column is tested on the first 200,000 rows of both files; the best candidates are then measured exactly for how unique they are and how many keys both files share. When no single column is unique, pairs of columns (say, order number + line) are tried. Whole-number columns that aren't IDs and decimal columns are ranked down, because in a small file a quantity or a price can look unique by chance.

Repeated keys

A key that occurs more than once is numbered by its position in each file, so the first “A-100” pairs with the first “A-100”, the second with the second. Rows never multiply, and the repeated keys are listed so you can check them.

No key at all

Rows are then aligned like a text diff: identical stretches at the start and end are matched first, rows that occur once in each file serve as anchors, and what is left in between is paired when at least half of the columns agree (a changed row) or reported as added and removed. A row found at another position is shown as moved — or as unchanged, if you tell the tool row order doesn't matter.

How values are compared

Each pair of cells is compared exactly as written first. Only where that finds a difference are your rules applied, so a file with few changes is checked quickly and nothing is normalised behind your back.

Numbers in any notation

With number normalisation on, “1.234,50” from a German export and “1,234.50” or “1234.5” from an English one are the same value. Whole numbers are compared digit by digit unless you set a tolerance, so two 18-digit IDs that differ in the last digit are never declared equal by floating-point rounding.

Tolerances

Allow an absolute difference (0.01 for rounding to the cent) or a relative one (0.5 %) and smaller differences count as equal; the rest are listed with the difference in units and in percent.

Text and dates

Upper and lower case, leading, trailing and doubled spaces, and empty versus missing cells can each be ignored; dates written as 31.12.2024, 12/31/2024 or 2024-12-31 compare as one date.

What you can download — and the limits

The comparison itself never copies your data: it keeps a list of row numbers with a status and one changed/unchanged flag per column, and reads the values back for the screen and the downloads. That is why two files of a million rows each fit in a browser tab.

The Excel report

A summary, the changed rows with the old line above the new one and the changed cells filled, a filterable change list, and sheets of added and removed rows. Each report sheet holds up to 100,000 lines; the change list and the flagged new version, downloaded on their own as CSV, Excel or Parquet, always contain every row.

Values, not looks

Formatting, colours, comments and formulas themselves are not compared — a formula counts with the result Excel saved in the file. To check a layout or a PDF, use the PDF comparison instead.

How to use it

  1. Drop both CSV files (or a CSV and an Excel or Parquet file).
  2. Keep the suggested key column, choose another, or compare by row order.
  3. Adjust the rules — case, spaces, number and date formats, tolerances, columns to skip.
  4. Review the differences and download the change list or a report.

Frequently asked questions

How are rows matched?

By a key: the tool measures which column (or pair of columns) is unique in both files and shared by most rows — an article number, customer ID or e-mail — and suggests it. You can pick another key or combine columns. Rows with the same key are compared cell by cell, so sorting a file differently doesn't create false differences. A key that repeats is paired in file order and reported.

What if my table has no ID column?

Then rows are aligned by content, like a text diff: identical rows anchor the alignment, rows in between that share most of their values are shown as changed, and rows found elsewhere in the file are reported as moved. You can also tell the tool to ignore row order.

My files use different delimiters or number formats. Does that matter?

No. Each file is read with its own delimiter, encoding and number format, and numbers written as text are compared as numbers, so 1.234,50 and 1,234.50 count as the same value. You can switch this off under Rules.

How large can the files be?

Millions of rows per file on a computer. In our measurement two tables of 1,000,000 rows × 20 columns were compared by key in about 3 seconds (without a key, by alignment, in under 10 seconds). Phones have much less memory for a browser tab, so very large files are best compared on a computer.

Are my files uploaded?

No. The comparison runs in your browser tab with DuckDB compiled to WebAssembly; nothing is sent to a server. You can disconnect from the internet after the page has loaded and it still works.

How do I ignore rounding differences?

Under Rules, set a tolerance for numbers: an absolute one such as 0.01, or a percentage. Differences within it count as equal; everything larger stays in the change list with its difference in units and percent.

The columns were renamed or reordered. Does that break the comparison?

No. Columns are paired by name wherever they stand, renamed ones are suggested from their names and the values they share, and columns that exist in only one file are listed as added or removed. Columns you don't care about can be left out of the comparison.