JSON Diff
Paste two JSON documents to see exactly what changed — every added, removed and changed value, listed by path. Key order never counts as a difference.
Last updated
Original (left)
ValidModified (right)
ValidDifferences
2 changed2 added2 removed- ~$.email"ada@example.com" → "ada@company.com"
- −$.roles[1]"dev"
- ~$.plan.tier"pro" → "team"
- +$.plan.trialfalse
- −$.legacyId"u-77"
- +$.lastLogin"2026-11-27T09:30:00Z"
Keyboard shortcuts:Ctrl ↵Copy differencesCtrl SDownloadCtrl KSearch tools
How to use the JSON Diff
Paste the original
Put the older or expected JSON on the left, for example yesterday's API response.
Paste the new version
Put the newer or actual JSON on the right. Each side shows whether it's valid JSON, with the line of any error.
Read the differences
Every change is listed with its path, such as `$.plan.tier`, and the old and new values.
Copy or export
Copy the list, or switch to JSON Patch to get an RFC 6902 patch that turns the left document into the right one.
Features
- Structural comparison of nested objects and arrays — not a line-by-line text diff
- Key order is ignored, so reordered objects compare as equal
- Optional “Ignore array order” compares arrays as unordered collections
- Changes listed by JSONPath-style path, such as `$.orders[0].total`, with old and new values
- Counts of changed, added and removed values
- JSON Patch (RFC 6902) output with add, remove and replace operations
- Type changes, such as a number that became a string, are reported as changes
- Swap sides, clear each side, and copy or download the result — also with Ctrl/Cmd + Enter and Ctrl/Cmd + S
Privacy
Both documents are processed by JavaScript in your browser tab. Nothing is uploaded or stored, and the page's security policy blocks it from sending data to any other site.
Examples
Compare two API responses
The same user before and after an update: two values changed, one key was added, one removed, and a role was dropped.
Left · right
{"id":1042,"email":"ada@example.com","roles":["admin","dev"],"plan":{"tier":"pro","seats":5},"legacyId":"u-77"} --- {"id":1042,"email":"ada@company.com","roles":["admin"],"plan":{"tier":"team","seats":5},"lastLogin":"2026-11-27T09:30:00Z"}Differences
2 changed, 1 added, 2 removed ~ $.email: "ada@example.com" → "ada@company.com" - $.roles[1]: "dev" ~ $.plan.tier: "pro" → "team" - $.legacyId: "u-77" + $.lastLogin: "2026-11-27T09:30:00Z"Same items, different order
With Ignore array order on, only the permission that really changed is reported. Loads with the option on.
Left · right
{"user":"ada","permissions":["read","write","deploy"]} --- {"user":"ada","permissions":["deploy","read","admin"]}Differences (ignoring array order)
0 changed, 1 added, 1 removed - $.permissions[1]: "write" + $.permissions[2]: "admin"Device config as a JSON Patch
The JSON Patch view gives the operations to send to a device or an API that accepts RFC 6902 patches.
Left · right
{"device":"dev-1042","interval":60,"mqtt":{"host":"broker.local","qos":1},"sensors":["temp","humidity"]} --- {"device":"dev-1042","interval":30,"mqtt":{"host":"broker.local","qos":1,"tls":true},"sensors":["temp"]}JSON Patch
[ { "op": "replace", "path": "/interval", "value": 30 }, { "op": "remove", "path": "/sensors/1" }, { "op": "add", "path": "/mqtt/tls", "value": true } ]
Understanding comparing JSON
Why a structural diff beats a text diff for JSON
A text diff compares lines, so the same data formatted differently — minified on one side, pretty-printed on the other, or with keys in another order — shows up as a wall of changes. A structural diff parses both documents first and compares values, so only real differences appear.
Left: {"id": 1, "tags": ["a"], "plan": {"tier": "pro"}}
Right: {"plan": {"tier": "team"}, "id": 1, "tags": ["a", "b"]}
~ $.plan.tier: "pro" → "team"
+ $.tags[1]: "b"How arrays are compared
By default arrays are compared position by position: item 0 with item 0, item 1 with item 1. Extra items on the right are added, and extra items on the left are removed. This is right for ordered data such as steps or time series.
When order doesn't matter — tags, roles, or a list of IDs that an API returns in any order — turn on Ignore array order. Items are then matched by value, and only items that exist on one side and not the other are reported.
JSON Patch (RFC 6902)
A JSON Patch is a list of operations that turns one document into another. It's how many APIs accept partial updates (PATCH requests with Content-Type: application/json-patch+json), and it's a compact way to store or review changes.
[
{ "op": "replace", "path": "/plan/tier", "value": "team" },
{ "op": "add", "path": "/tags/1", "value": "b" }
]Paths are JSON Pointers (RFC 6901): / separates levels, and ~1 and ~0 stand for / and ~ inside a key. Removals from the same array are listed from the highest index down, so applying them in order is safe.
Common reasons two responses differ
- Numbers sent as strings by one service (
"42"vs42) — shown as a changed value. - A field that is
nullin one response and missing in the other — shown as removed or added, because they aren't the same in JSON. - Timestamps and generated IDs that change on every request — expected, but worth spotting before you write a test.
- Arrays returned in a different order — turn on Ignore array order to check whether the contents match.
Frequently asked questions
Does key order matter?
No. Objects are compared key by key, so {"a":1,"b":2} and {"b":2,"a":1} are equal. Only changed values, added keys and removed keys count as differences.
How do I compare arrays when the order doesn't matter?
Turn on Ignore array order. Items are then matched by value, so [1, 2, 3] and [3, 1, 2] are equal, and only items present on one side but not the other are listed.
What is the JSON Patch view?
An RFC 6902 JSON Patch: a list of add, remove and replace operations that turns the left document into the right one. It needs exact array positions, so it isn't available while Ignore array order is on.
Is null the same as a missing key?
No. In JSON, a key set to null and a key that isn't there are different, so the diff reports the key as added or removed.
How large can the documents be?
Several megabytes is fine in a modern browser. The list stops after 2,000 differences so the page stays responsive.
Are my JSON documents uploaded?
No. Both documents are parsed and compared by JavaScript in your browser tab and are never sent anywhere.