# Data Comparison (CSV and Excel Diff)

> Compare two CSV, Excel, JSON, Parquet or Avro files by a key column. See inserts, updates and deletes (CDC), cell by cell. Free, in your browser.

Page: https://datautility.in/data-comparison
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

**Quick answer:** Compare two datasets and see what was added, removed or changed.

## How to use the Data Comparison (CSV and Excel Diff)

Data Comparison shows exactly what changed between two versions of a file. Pick a key column, or use the first column or the first two columns, and it lists rows that were added, removed or changed, down to the cell. Use it to check an export against last month, to review a data migration, or to find which values a script changed. CSV, Excel, JSON, Parquet and Avro are supported, and the two files can be different formats.

1. Load dataset A and B
2. Pick or type the key column
3. Review and download the differences

## What it does

- See rows added, removed or changed
- Down to the cell
- Pick any key column
- Download the differences

## Tips

- A key column (like id) matches the same record in both files. Click Use first column as key, pick columns, or type their names.
- If you choose no key, the first two columns of the files are used as the key.
- Numbers match by value, so 36 and 36.0 are treated as equal. Dates match across formats too: a text date, an Excel date and a Parquet timestamp at midnight are the same value.
- Comparing different formats? Columns whose names differ only by case or punctuation (address.city in a CSV and address_city in an Avro file, which cannot hold dots) are matched, and the page tells you which.
- Use “Ignore case” or “Ignore spaces” to skip trivial differences.

## Example

Input:

```
before.csv + after.csv, key = id
```

Output:

```
Added 3 · Removed 2 · Changed 5
```

## Frequently asked questions

### Can I use it for change data capture (CDC)?
For files, yes. Load yesterday's snapshot and today's, choose the key, and the added rows are the inserts, the changed rows are the updates and the removed rows are the deletes. It is a snapshot comparison, not log-based CDC: it does not read database logs or stream changes live.

### How do I find new, updated and deleted rows between two files?
Load both files, choose a key column such as id, and read the three lists: added (new), changed (updated, with the old and new value of each cell) and removed (deleted).

### Which file formats can I compare?
CSV, TSV, Excel (.xlsx), JSON, Parquet and Avro, in any combination. For example, compare a Parquet file with the CSV it was made from. Nested JSON and Avro fields are flattened into columns such as address.city.

### Will 10 in a CSV match 10 in a Parquet file?
Yes. Values are compared by meaning, not by how they are written: 10 equals 10.0, true equals "true", and a date equals the same date in any format. A value only counts as changed if it really differs.

### Can Data Comparison do change data capture (CDC)?
It does the snapshot version of CDC for files. Compare the earlier and the latest export by key: added rows are inserts, changed rows are updates and removed rows are deletes. It does not read database logs or run in real time.

### How does Data Comparison find differences?
It matches rows by a key column, or by the first two columns, and shows which rows were added, removed or changed, down to the cell. It works with CSV and Excel files.

### Is my data uploaded?
No. Everything runs in your browser and nothing is stored.

## Related pages

- [Compare Two CSV Files](https://datautility.in/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](https://datautility.in/compare-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](https://datautility.in/compare-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](https://datautility.in/compare-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](https://datautility.in/compare-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](https://datautility.in/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.
- [CSV Diff Tool](https://datautility.in/csv-diff): Find the differences between two CSV files online: which rows were added, removed or changed, cell by cell. Free, in your browser.
- [CDC for CSV and Excel Files (Change Data Capture)](https://datautility.in/change-data-capture-csv): Change data capture for files: compare two CSV or Excel snapshots and list inserts, updates and deletes by key. Free, private, runs in your browser.

## Topic guides

- [CSV Guides and Free CSV Tools](https://datautility.in/guides/csv)
- [Excel Guides and Free Excel Tools](https://datautility.in/guides/excel)
- [Data Cleaning Guides and Free Tools](https://datautility.in/guides/data-cleaning)

## Guides

- [Compare Two CSV or Excel Files: Find Added, Removed and Changed Rows](https://datautility.in/blog/compare-two-csv-files-find-differences)
- [Compare Two Financial Files: A Simple Reconciliation](https://datautility.in/blog/compare-financial-reports-reconciliation-files)
- [How to Compare Two JSON API Responses](https://datautility.in/blog/compare-json-api-responses)
- [Compare Inventory and Stock Files Between Two Dates](https://datautility.in/blog/compare-inventory-and-stock-files)

Open the tool: https://datautility.in/data-comparison
