JSON compare

To compare JSON, paste the two documents into A and B: the tool shows every difference with its path, old and new value – added, removed, changed or changed in type. Formatting and key order do not matter.

Source: IETF – RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format (§ 4: objects are unordered). Updated: .

My Toolbox

Result

Result
4 differences: 2 added, 0 removed, 2 changed.
Differences
PathKindValue in AValue in B
$.ageChanged3031
$.tags[2]Added"c"
$.address.cityChanged"Leeds""York"
$.address.countryAdded"GB"

How it is calculated

Comparing JSON means setting two documents side by side by their content, not their text. Two JSON files can be formatted differently and still say the same thing. The tool compares the content in your browser and names every difference with its path in JSONPath style, for example $.address.city.

How it works

  1. Paste the old JSON into field A and the new one into field B.
  2. Optionally compare arrays regardless of order or treat null and a missing field as equal.
  3. The table shows every difference with path, kind and both values.

How the comparison works

Limits

The result shows differences in content. To compare the text as well (formatting, order), use “Compare texts”.

Privacy

The documents never leave your browser. Next steps: format JSON, compare texts or YAML to JSON.

Frequently asked questions

How can I compare two JSON files?

Paste both JSON documents into fields A and B. The tool lists every difference with path, old and new value.

Does the order of keys matter?

No. JSON objects are unordered; “a” before “b” is the same as “b” before “a”.

How do I compare arrays whose order does not matter?

Tick “Compare arrays regardless of element order”. Equal elements are then matched up and only real differences appear.

What does the path in the table mean?

It shows where the difference is: $.address.city is the field “city” in the object “address”, $.tags[2] the third element of the list “tags”.

Is my JSON uploaded?

No. The comparison runs entirely in your browser.

Sources and legal basis

As of: · Editorial policy

Related tools