How to Compare Two JSON API Responses

An API changed, or two environments disagree. Here is a quick way to see which records differ.

Open the Data Comparison

When a release changes an API, or staging and production return different data, a text diff of two long JSON files is hard to read. Field order, spacing and long arrays drown the real change.

Data Comparison reads CSV and Excel files, not JSON, so convert first. Turn each response into a table with API Response to Table, or convert a saved JSON file to CSV with the Format Converter. Each record becomes a row and nested fields become columns named by their path, such as address.city. Then load the two CSV files in Data Comparison and match them by a key column such as an id. It shows the added, removed and changed rows, and it can trim spaces, ignore case and accept a small tolerance on numbers, which removes a lot of noise.

Choose a key that is unique in both files, and use the same list of records from both responses. If the response holds several lists, pick the same one each time. Check that both files have the same columns, because a renamed field in the new version will show up as a column that exists in only one file.

Understand the limits. This compares tables of records. It is not a schema checker, and flattening lists inside a record keeps them as text in one cell. Treat a difference as a lead and confirm it against the source or the API documentation.

Open the Data Comparison

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.
  • CSV Diff Tool: Find the differences between two CSV files online: which rows were added, removed or changed, cell by cell. Free, in your browser.

How to use the Data Comparison: step by step

  1. Convert both responses to CSV with API Response to Table or the Format Converter.
  2. Open Data Comparison and load both CSV files.
  3. Choose the key column and set trim, ignore case or tolerance if needed.
  4. Review added, removed and changed rows.

When to use the Data Comparison

  • See what a release changed in an API
  • Check staging against production data
  • Compare two exports of the same list
  • Find records that disappeared

Example

Input: before.csv + after.csv, key = id

Output: Added 3 · Removed 2 · Changed 5

Frequently asked questions

Can the files be different formats?

Yes. A can be a CSV and B an Excel file. Columns are matched by name. JSON and Parquet files are not supported here, so convert them to CSV first.

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.

Tip: Convert to CSV first. Data Comparison reads CSV and Excel, not JSON.