JSON Diff

Compare two JSON documents and see a structural diff of what was added, removed and changed — entirely in your browser.

Both JSON documents are parsed and diffed locally in your browser and never uploaded, but avoid pasting secrets or production credentials into any online tool.

Need to reshape the result? Try the JSON Formatter.

About JSON Diff

JSON Diff compares two JSON documents and shows a structural diff instead of a line-by-line text diff. Paste your original JSON on the left and the changed version on the right, and it parses both and reports exactly which values were added, removed, changed, or had their type altered — each with a path like user.roles[2]. Because the comparison is semantic, reordering object keys never shows up as a difference, so you only see changes that actually matter. Turn on Ignore array order to compare arrays as sets, or Sort keys to normalize both sides in the side-by-side view. It is built for developers diffing API responses, config files, and fixtures. Everything runs locally in your browser, so the JSON you paste is never uploaded and stays on your device.

Features

How to use the JSON Diff

  1. Paste the original JSON into the Original box on the left.
  2. Paste the updated JSON into the Changed box on the right.
  3. Read the colored diff: green for added, red for removed, amber for changed values.
  4. Toggle Ignore array order or Sort keys if order should not count as a difference.
  5. Switch to Side by side to compare both formatted documents, or copy the diff summary.

Example

Input

// Original
{ "name": "Ada", "roles": ["admin"], "active": 1 }

// Changed
{ "active": "1", "name": "Ada", "roles": ["admin", "editor"] }

Output

+ roles[1]: "editor"
~ active: 1 → "1"   (type changed)

Reordered keys are ignored; a new array item is added and active flips from number to string.

Common errors & troubleshooting

Frequently asked questions

Does JSON Diff ignore the order of object keys?
Yes. The comparison is semantic, so two objects with the same keys and values are equal regardless of key order. Only real additions, removals, and value changes are reported, each with its path.
How does JSON Diff handle arrays in a different order?
By default arrays are compared by position, so reordering elements shows up as changes. Turn on Ignore array order to compare arrays as multisets, where only genuinely added or removed members are flagged.
Why are 1 and "1" shown as different?
Because their JSON types differ — one is a number and the other a string. JSON Diff labels this a type change, separate from an ordinary value change, so you can catch accidental stringified numbers in API responses.
What does a path like user.roles[2] mean in the diff?
It points to the exact location of the change: the key user, then its roles array, then the element at index 2. Object keys use dots and array elements use bracketed indices.
Can I compare deeply nested JSON and nested arrays?
Yes. JSON Diff walks both documents recursively through nested objects and arrays of any depth, reporting each change at its full path so large, deeply nested payloads stay readable.
Is the JSON I paste into JSON Diff uploaded anywhere?
No. Both documents are parsed and compared entirely in your browser, so the JSON you paste — including any sensitive fields — stays on your device and is never sent to a server.

Related tools

All ArrayKit tools