DevToolbox

JSON Diff

Compare two JSON documents structurally

Original JSON
Loading...
Modified JSON
Loading...
Structural Diff

Enter JSON on both sides to see structural differences

Related tools

What is JSON diffing?

JSON diffing compares two JSON documents structurally, identifying added keys, removed keys, and changed values at every nesting level. Unlike plain text diff, it understands JSON structure so reordered keys don't show as changes. All comparison runs in your browser.

Comparing JSON by structure, not text

A plain text diff of two JSON documents is noisy: reordered keys, different indentation, or spacing show up as changes even when the data is identical. A JSON diff compares the two documents by their structure instead — matching keys and values regardless of formatting — so it reports only real differences in the data.

This makes it the right tool for comparing API responses, configuration objects, and fixtures, where you care whether a value changed, not whether the whitespace did.

What a JSON diff reveals

The comparison highlights keys that were added or removed, values that changed, and differences deep inside nested objects and arrays. That lets you answer questions like which field a new API version changed, or why two environments behave differently, without manually scanning two large documents.

Comparing API versions and environments

A structural JSON diff is the quickest way to answer two common questions: what changed between two versions of an API response, and why two environments return different data. Because it ignores formatting and key order, every difference it reports is a real change worth investigating.

How to compare two JSON documents

  1. 1Paste both documents. Put one JSON document on each side — for example two API responses.
  2. 2Click Compare. Added, removed, and changed keys and values are highlighted by structure.
  3. 3Swap to reverse. Use Swap to view the difference from the other document's perspective.

Examples

A changed value

Input

A: {"active":true}
B: {"active":false}

Output

~ active: true → false

An added key

Input

A: {"id":1}
B: {"id":1,"name":"Ada"}

Output

+ name: "Ada"

JSON diff results

How structural changes are reported.

SymbolMeaning
+ keyKey added in the second document
- keyKey removed from the second document
~ valueValue changed
nestedDifferences shown inside objects and arrays
reordered keysIgnored — not a real change

Frequently asked questions

How is this different from a text diff?+

A text diff compares characters, so reordered keys or different formatting look like changes. A JSON diff compares the parsed data, reporting only genuine differences in keys and values.

Does key order matter?+

No. Objects are compared by key, so two documents with the same keys in a different order are treated as equal.

Does it compare nested objects and arrays?+

Yes. Differences at any depth — inside nested objects and array elements — are detected and shown.

Do both inputs need to be valid JSON?+

Yes. Each side must parse as JSON; invalid input is reported so you can fix it before comparing.

Is my data private?+

Yes. Both documents are compared in your browser and never uploaded.

Is it free?+

Yes — free and unlimited.

Does array order matter?+

Yes. Array order is significant in JSON, so reordered elements are reported as changes, while objects are compared regardless of key order.