JSON Diff
Compare two JSON objects and see exactly what changed — added, removed and modified keys, shown recursively.
Compare two JSON objects and see exactly what changed: added, removed and modified keys shown recursively with the old and new values. Perfect for API responses, configs and payloads — all computed locally in your browser.
How to use the JSON Diff
- Paste the before object on the left and the after object on the right.
- Click Compare — differences are listed by dotted path.
- Green = added, red = removed, amber = changed with both values.
Frequently asked questions
How do I compare two JSON objects?
Paste both objects above and click Compare. The tool walks the structure recursively and lists every difference by key path.
Does it handle nested objects?
Yes — nested objects are compared recursively, and differences are reported with dotted paths like owner.email.
What counts as a change?
Keys present only in the right object are added, only in the left are removed, and keys whose JSON values differ are changed (old → new).
Is the comparison done on a server?
No — the diff runs entirely in your browser, so sensitive configs and payloads never leave your machine.
Fun facts about JSON Diff
- JSON Patch (RFC 6902) defines a standard format for describing changes to a JSON document — it uses operations like 'add', 'remove', 'replace', and 'move'.
- Deep comparison of JSON objects is surprisingly complex — JavaScript's === operator compares object references, not values, which is why JSON.stringify comparison is common.
- The JSON Merge Patch format (RFC 7396) is simpler than JSON Patch — it uses a partial JSON object to describe changes, with null meaning 'delete this field'.
- Git's diff algorithm works on text lines, not structured data — which is why JSON config files often produce noisy diffs when keys are reordered.
- MongoDB ($set) and PostgreSQL (jsonb_set) can update individual fields inside a JSON document without rewriting the whole document.