JSON Diff
Compare two JSON documents structurally and see added, removed and changed keys — order-independent.
Results are provided as is, for general information. Check anything important before relying on it. See the Terms of Use.
About this tool
A line-by-line text diff of two JSON documents is noisy: reindent a file or reorder its keys and every line looks changed even though the data is identical. This tool compares the parsed structure instead. Object keys are matched by name regardless of order, arrays are compared position by position, and only real differences are reported — a key added on the right, a key removed on the left, or a leaf whose value changed. When a value's type flips (an object becomes an array, a string becomes a number) that is shown as one change rather than an avalanche of child differences. Both documents are parsed and compared in your browser; nothing is uploaded.
When to use it
Questions
Why does it ignore key order but not array order?
JSON objects are unordered by specification — {"a":1,"b":2} and {"b":2,"a":1} are the same value, so reordering keys is not a change. Arrays are ordered, so the item at index 0 is compared with the item at index 0. If you moved an element within an array, expect to see it reported as a change at each shifted index; this tool does not try to detect moves.
How are added and removed array items shown?
By index. If the left array has three items and the right has two, index 2 is reported as removed. If the right is longer, the extra indices are reported as added. Elements that still line up by position are compared normally.
What does a change at path "(root)" mean?
The two documents differ at the very top — for example one is an object and the other is an array, or one is a bare number. The path column is empty at the root, so the tool labels it "(root)".
Is null treated the same as a missing key?
No. A key whose value is null is present; a key that is absent is missing. Adding "x": null where there was no x at all is reported as an addition, and changing "x": null to "x": 0 is a change.
Does it show me a merged or patched document?
No — it reports the differences as a list, not a JSON Patch or a three-way merge result. Use it to understand what changed, then apply the edit yourself.