JSON diff: compare two JSON files

Compare two JSON documents or API responses and see every added, removed and changed path. Key order is ignored. Private, runs in your browser.

Runs in your browser. Nothing you paste is uploaded. Key order is ignored.

3 differences
  • changed $.tools: 76 → 82
  • added $.tags[1]: "image"
  • added $.hindi: true

How to use it

  1. Paste the original JSON in the left box.
  2. Paste the changed JSON in the right box.
  3. Read the list of differences below: each line shows the path and whether it was added, removed or changed, with the old and new value.
  4. Fix either side and the list updates instantly.

A diff that understands JSON

A normal text diff gets confused by JSON: if one API returns keys in a different order, or formats the same data with different spacing, every line looks changed. JSON Diff compares the data itself. Key order and whitespace are ignored, so you only see real differences: a new field, a missing field, or a value that changed from 76 to 82.

Each difference is shown with its path, such as $.owner.email or $.items[2].price. That makes it easy to find in the original files and to describe in a bug report: "$.status changed from active to suspended between staging and production".

Good uses

Check what changed in an API response after a deployment, compare a config file between two environments, confirm that a migration kept every record, or review a feature-flag file before you push it. Arrays are compared by position, so an item inserted at the start shows the following items as changed; sort arrays first if their order does not matter.

Questions

Does key order matter?
No. {"a":1,"b":2} and {"b":2,"a":1} are treated as the same.
How are arrays compared?
Item by item, by position. If order is not meaningful in your data, sort both arrays the same way before comparing.
Can I compare plain text instead?
Yes, use the Diff Checker, which compares any two texts line by line.
Is what I paste sent to a server?
No. The tool runs as JavaScript in your browser. Your text, files and keys stay on your device, so it is safe to use with internal data, tokens and customer records. It keeps working offline after the page has loaded once.

More free tools