TheJSON

JSON Diff

Compare two JSON documents. Key order is ignored, so only real changes show up, each with its JSON path.

How the JSON diff works

TheJSON parses both documents and walks them structurally. Objects are compared by key, arrays by index, so reordering keys or reformatting whitespace produces no differences. Every change is reported with its JSONPath (for example $.dependencies.react) and classified as added, removed, changed, or a type change such as a number that became a string. Copy report gives you the list as plain text for a pull request or a ticket.

Common uses

  • Compare API responses between two environments or releases.
  • Review changes to package.json, config files, or feature flags.
  • Verify a data migration produced the expected output.
  • Check what a third-party webhook payload looks like after a vendor update.

Like every tool on TheJSON, this runs entirely in your browser. Nothing you paste is uploaded, logged or stored on a server, so it is safe to use with API responses that contain tokens or customer data.

Frequently asked questions

Does key order matter in a JSON diff?

No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are reported as identical. Use Format both to normalise whitespace as well.

How are arrays compared?

By position. Inserting an element at the start of an array shifts every following element, so each is reported as changed. Sort arrays consistently before comparing if order is not meaningful in your data.

Can I compare two large API responses?

Yes. Both sides are parsed in the browser and the diff runs in a single pass, so documents of several megabytes compare in well under a second.

Related JSON tools