<Diff
Stack/>

JSON Compare Online

Compare two JSON files with a structural, key-aware diff: added, removed, and changed keys, ignore key order, auto-format. Free and 100% in your browser.

Find changed JSON values by path

Compare API responses or configuration files with a structural JSON diff. The summary lists added, removed, and changed values by JSON path; auto-format and key sorting can remove object-order noise from the text view.

How to Compare Two JSON Files

  1. 01.Load your files

    Paste or upload valid JSON on each side. Keep Auto-format and Ignore key order enabled to normalize object keys.

  2. 02.Find differences

    Select Find Differences to compare both versions. Use Try an example to load the sample below and open its diff.

  3. 03.Review the result

    Inspect the JSON paths in the structural summary, then use the text diff for context.

JSON comparison example

Original
{
  "name": "checkout-service",
  "version": "2.4.0",
  "port": 8080,
  "features": { "retry": true, "tracing": false },
  "regions": ["us-east-1", "eu-west-1"]
}
Modified
{
  "version": "2.5.0",
  "name": "checkout-service",
  "port": 8443,
  "features": { "retry": true, "rateLimit": true },
  "regions": ["us-east-1", "eu-west-1", "ap-south-1"]
}

The service example changes $.version and $.port, removes $.features.tracing, adds $.features.rateLimit, and appends a region. Reordering the name and version keys does not change their values.

JSON Diff Tips

Key order does not matter in JSON

{"a":1,"b":2} and {"b":2,"a":1} are the same object. Keep 'Ignore key order' on to skip reordering noise and surface only real value changes.

Auto-format defeats whitespace noise

Minified vs pretty-printed JSON is byte-different but semantically identical. The auto-format option normalizes both sides before diffing.

Array order is significant

Unlike object keys, [1,2] and [2,1] are different values. If your arrays are conceptually sets, sort them before comparing.

Read the path, not just the value

The structural summary reports changes as paths like $.user.address.city. When a nested field changes deep in an API response, the path tells you exactly where — faster than scanning the text diff.

Before you compare

Array order remains significant. Invalid JSON falls back to a text comparison with an error message; this tool does not validate JSON against a schema.

Each side supports up to 250,000 characters or 5,000 lines. Each uploaded text file can be up to 256 KB. Compared contents stay in your browser. No account is required.

Working with another format? Try YAML Comparison Tool or XML Diff Tool.

Frequently Asked Questions

Clear answers to your comparison queries.