Compare JSON
Diff two JSON documents by value and see every added, removed, and changed field with its path.
5 differences2 added · 1 removed · 2 changed
changed
$.age30→31changed
$.tags[1]"b"→"c"added
$.tags[2]"d"removed
$.address{"city":"NYC"}added
$.email"ann@example.com"Diff two JSON documents
Comparing JSON by eye is painful — key order and indentation get in the way. Paste your two documents and this tool compares them by value, ignoring formatting and key order, then lists every difference with its exact path. Great for spotting what changed between two API responses, config files, or fixtures.
Reading the results
- Added — a key or array item present in B but not A.
- Removed — present in A but not B.
- Changed — present in both but with a different value (shown as old → new).
Paths use $ for the root, .key for object keys, and [i] for array indexes. Need to clean up invalid JSON first? Use Fix JSON.
Frequently Asked Questions
- How does the JSON comparison work?
- It parses both documents and walks them structurally — key by key and index by index — reporting every difference as added, removed or changed, with the exact path (for example $.address.city or $.tags[2]). Key order and whitespace are ignored; only the data matters.
- Does array order matter?
- Yes. Arrays are compared by position, so [1,2] and [2,1] are reported as changes. This matches how JSON values are actually equal.
- What does the path notation mean?
- $ is the root. A dot accesses an object key ($.user.name) and brackets access an array index ($.items[0]). The path tells you exactly where each difference is.
- Is my data uploaded?
- No. Both documents are parsed and compared entirely in your browser.