JSON diff
Paste two JSON documents and get a list of what changed, by path. Key order does not matter, and nothing leaves this tab.
tool 14 of 21 []
all shortcuts ?
How to use it
- Paste the original document on the left and the changed one on the right. Both must be valid JSON; if one is not, the message says which side and where the parser stopped.
- Every difference is listed by its path, such as $.user.roles[1]. Lines starting with - are the old value and lines starting with + are the new one.
- Objects are compared by key, so reordering keys is not a change. Arrays are compared position by position, so inserting an item near the top of an array shows every later item as changed.
- Copy the plain-text report to paste into a pull request, a ticket or a changelog.
What counts as a difference
JSON has six value types: object, array, string, number, boolean and null. This tool reports a path as changed when the type differs (1 versus "1", null versus an empty object) or when a string, number or boolean differs. It reports a path as added or removed when a key or array position exists on only one side.
Object member order carries no meaning in JSON. RFC 8259 describes an object as an unordered collection of name and value pairs, so a diff that flags reordered keys is noise. This tool sorts that out by comparing by key.
Arrays are ordered, and there is no key to match items on, so they are compared by index. If your arrays are really sets (tags, IDs), sort them before you compare, or expect a shifted array to show many changes.
How each case is reported
| Situation | Reported as | Example path |
|---|---|---|
| Key only on the right | Added (+) | $.owner |
| Key only on the left | Removed (-) | $.legacy_id |
| Same key, different scalar | Changed (- then +) | $.port |
| Same key, different type | Changed (- then +) | $.limit (1 versus "1") |
| Array longer on the right | Added at each new index | $.tags[2] |
| Array shorter on the right | Removed at each missing index | $.tags[1] |
| Same members, different key order | Not a difference | (none) |
| Key with a dot or space in its name | Bracket form | $["a.b"] |
Numbers are compared as parsed by the browser (IEEE 754 doubles). Integers beyond 2^53 may compare equal when their digits differ.
Examples
Select an example to load it into the tool.
- Config change
{"name":"api","port":8080,"debug":true,"tags":["web","v1"]} - Key order only
{"a":1,"b":{"x":1,"y":2}}
Frequently asked questions
Does it ignore key order?
Yes. Objects are compared by key. Arrays are ordered, so a different item order in an array is a difference.
Why does inserting one array item show many changes?
Arrays are compared by position. An item added at the start shifts every later item by one index, so each later position differs. Sort or key the array first if order is not meaningful.
Is this the same as JSON Patch (RFC 6902)?
No. The report is meant for people to read. JSON Patch is a machine format with operations such as add, remove and replace. The paths here use a JSONPath-like notation rather than JSON Pointer.
Is my JSON uploaded?
No. Both documents are parsed and compared in this tab. The test suite fails the build if this tool contains a network call.
How large a document can it compare?
It runs in the page, so the limit is your browser memory. A few megabytes compare instantly; very large files will slow the tab.
Sources
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format checked 2026-10-21