CompareOnline4U.

Home › Guides

How to compare two JSON files or API responses

JSON Compare — open the free tool →

An API response changed and a test started failing. A config file works on one server but not another. Two translation files are out of sync. In each case you need to see exactly which keys and values differ — and comparing JSON by eye, especially minified JSON, is painful.

Step by step

  1. Open JSON Compare.
  2. Paste the original JSON on the left and the new JSON on the right. Minified or formatted both work.
  3. Click Compare now. Valid JSON is pretty-printed with 2-space indentation so both sides line up.
  4. Review the highlighted lines. Each changed key or value appears on its own line.
  5. Copy or download the report to share in a ticket or pull request.

Everything runs in your browser, so tokens, user data and internal configs stay on your machine.

Understanding the result

Common problems

One side isn't formatted. That usually means a syntax error, such as a trailing comma, single quotes or a missing bracket. Invalid JSON is compared as plain text, so you still see differences, but fixing the error gives a cleaner result.

Too much noise from key order. If one system sorts keys alphabetically and another doesn't, sort keys on both sides first (many editors and command-line tools can do this), then compare.

Timestamps and IDs always differ. Values like createdAt or request IDs change on every call. Expect them in the diff and focus on the rest.

Where JSON comparison helps

Working with other formats? See YAML Compare, XML Compare or Code Compare.

JSON Compare — open the free tool →

Frequently asked questions

Can I compare minified JSON?

Yes. Valid JSON is formatted automatically before comparing, so minified and pretty-printed JSON line up.

Does key order matter?

The comparison is line-based after formatting, so keys in different positions show as removed and added. Keep keys in the same order for clean results.

Is my JSON sent to a server?

No. Parsing, formatting and comparing all happen in your browser.

More guides

How to compare two XML files and find the differencesCompare two XML files the right way: format both first, handle attribute order, then diff online, in Notepad++, VS Code or with xmllint on the command line.How to compare two CSV files row by rowFind added, removed and changed rows between two CSV exports. Free method with tips on sorting, delimiters and columns for accurate results.How to compare two Word documents and find every changeGot a revised Word file without tracked changes? Learn 3 ways to compare two .docx documents, including a free online method that keeps files private.How to compare two PDF files for differencesFind what changed between two PDF versions of a contract, invoice or report. Step-by-step free method, plus what to do with scanned PDFs.

← All comparison tools