JSON Diff
Compare two JSON objects with path-level changes
Paste one JSON on each side and inspect the diff first; array-order handling and fine-grained options are available in Advanced mode.
The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.
About this tool
Compare two JSON payloads and detect structural changes with path-level precision. The tool highlights added, removed, and modified values so you can quickly review API contract updates, config drifts, or data migration impacts. It is built for developers who need clean and fast JSON change reviews.
Production Snippets
An array swap is positional by default
text
Left:
{"a":[1,2]}
Right:
{"a":[2,1]}
Ignore array order off:
changed $.a[0]: 1 β 2
changed $.a[1]: 2 β 1
Ignore array order on:
No difference for this scalar-array example.Failure Clinic (Common Pitfalls)
An unordered option is mistaken for identity-based matching
Cause: The option sorts JSON.stringify representations and then compares positions. It does not match objects by id or fully canonicalize nested object ordering. Display paths do not escape dots or brackets in keys, and detail values are shortened.
Fix: Use the default positional comparison when order matters. For records with identities, compare matched records separately; inspect full source values before acting on a shortened summary.
Frequently Asked Questions
Do formatting or object key order cause differences?
Whitespace is removed by JSON parsing and ordinary object key order is ignored during recursive comparison. Added, removed, and changed values are reported. Numeric precision is limited to JavaScript numbers.
How are arrays compared?
By index by default. Ignore array order first sorts each compared array by JSON.stringify text, then compares positions. It is not identity-based matching or a complete unordered comparison for nested objects; differences can remain when object serialization order differs.
Can I apply the result as a JSON Patch?
No. The output is a readable summary using dotted and bracketed display paths, without escaping special property names. Individual values are shortened after 80 characters. It does not generate an executable patch or determine API compatibility. Both input drafts are saved locally.
Keep browsing