How to Compare Two Files in Different Formats: CSV, JSON, Excel, Parquet and Avro
A pipeline writes Parquet, the source system exports CSV, the API returns JSON, and finance sends Excel. Sooner or later you need to know whether two of them hold the same data. A normal text diff cannot answer that, because the same value is written differently in each format. This guide explains why format-to-format comparison goes wrong and how to compare any two of CSV, Excel, JSON, Parquet and Avro by key, in your browser, without false differences.
Why a text diff fails across formats
Open a CSV and a JSON file with identical data in a text diff and every line differs. Even between two data-aware tools, the same value can look different:
- A CSV stores everything as text: `10`. Parquet stores a typed number: `10.0`.
- A boolean is `true` in JSON, `TRUE` in Excel and the text `true` in a CSV.
- A date is `2026-01-05` in a CSV, a number in Excel and a timestamp at midnight in Parquet.
- A nested JSON field `address.city` becomes a column in CSV, and `address_city` in Avro, which cannot hold dots in names.
- An empty CSV cell is a `null` in Parquet and JSON.
Compare these naively and you get thousands of differences that are not differences.
The method: turn both into tables, match by key, compare by meaning
- **Read each file as a table.** Nested JSON and Avro fields are flattened into columns such as `address.city`.
- **Match rows by a key**, such as `id`, not by position. Then a row that moved is not reported as changed.
- **Compare values by meaning.** `10` equals `10.0`, `true` equals `"true"`, a blank equals a null, and a date equals the same date in any format.
- **Match columns** whose names differ only by case or punctuation, such as `address.city` and `address_city`.
- **Report three things**: rows added, rows removed, and rows changed, with the columns that differ.
Step by step in Data Comparison
- Open Data Comparison.
- Load the first file as **A: original** and the second as **B: new**. Each can be CSV, Excel, JSON, Parquet or Avro.
- Choose the key column. It must identify a row in both files, such as an id or an invoice number. The tool suggests one.
- Read the summary: matched percentage, added, removed and changed rows, and the columns that changed most.
- Download the differences, with changed cells shown as `old → new`.
Settings that remove false differences
- **Ignore spaces around values** for exports that pad text.
- **Ignore upper/lower case** when one system upper-cases codes.
- **Number tolerance** when a conversion rounded decimals, for example 0.01.
Which pairs work
Any combination of the five formats works, including a file against its own conversion:
- CSV with Parquet: check a conversion kept every row.
- Two Parquet files: two pipeline runs.
- Two JSON files: two API snapshots, compared by record.
- Two Avro files: two event exports.
- Two Excel files or two CSV files: two versions of a report.
What it does not do
- It compares data, not formatting. Colours, formulas and column widths in Excel are not compared.
- It reads the first sheet of an Excel file.
- It compares two snapshots. It is not real-time change tracking and does not read database logs.
- Very large files depend on your browser's memory. For files of hundreds of megabytes, compare a filtered part or a sample.
- Arrays inside JSON are compared as a whole value.
Related tool pages
- Compare Two CSV Files: Compare two CSV or Excel files by a key column and see added, removed and changed rows. Free, runs in your browser.
- Compare Two Excel Files: Compare two Excel (.xlsx) files by a key column and see every added, removed and changed row and cell. Free, and your files stay in your browser.
- Compare Two Parquet Files: Compare two Parquet files by a key column and see every added, removed and changed row and cell. Free, runs in your browser, nothing is uploaded.
- Compare Two JSON Files: Compare two JSON files by a key field and see which records were added, removed or changed, down to the nested field. Free, in your browser.
- Compare Two Avro Files: Compare two Avro files by a key field and list the added, removed and changed records. Reads the embedded schema, runs in your browser. Free.
- Compare CSV with Parquet: Check that a Parquet file matches the CSV it was made from: find rows and values that differ after a conversion or migration. Free, in your browser.
Also try
- Compare a CSV and a JSON file by key
- Validate a data migration by comparing files
- Convert CSV to Parquet
How to use the Data Comparison: step by step
- Load file A and file B in any formats.
- Choose the key column.
- Set ignore-case, spaces and tolerance if needed.
- Review and download the differences.
When to use the Data Comparison
- Checking a CSV to Parquet conversion
- Comparing an API response with a CSV export
- Comparing two pipeline outputs
- Reconciling an Excel report with a system export
Example
Input: before.csv + after.csv, key = id
Output: Added 3 · Removed 2 · Changed 5
Frequently asked questions
Can I compare a CSV file with a JSON file?
Yes. Load one as A and the other as B, choose a key column and compare. Nested JSON fields are flattened into columns, and values are compared by meaning, so 10 and 10.0 match.
Can I compare Excel with Parquet or Avro?
Yes. Any two of CSV, Excel, JSON, Parquet and Avro can be compared, in any combination.
Why does my comparison show differences that are not real?
Usually a wrong key, different spellings of the same value, or rounding. Choose a unique key, turn on ignore case or spaces, and set a number tolerance.
Are my files uploaded?
No. Both files are read in your browser and are not uploaded to our servers.
Is this real-time change data capture?
No. It compares two snapshots by key: added rows are inserts, changed rows are updates and removed rows are deletes. It does not read database logs.
Tip: Pick the key first. A wrong key, such as a name that repeats, is the main reason a comparison looks noisy.