Skip to content
ZeroServer.tools

JSON Diff Checker

Compare two JSON objects and see what was added, removed, or changed.

4 differences
changedage
- 30
+ 31
removedcity
"NYC"
changedtags[1]
- "b"
+ "c"
addedcountry
"USA"

Structural JSON diff vs text diff

A plain text diff highlights changed lines, so re-ordering keys or reformatting shows up as noise. This tool parses both sides and compares them structurally — by key and value — so you see only what actually changed: keys added, removed, or changed, each with its path. Both documents are parsed in your browser.

Related: the JSON formatter, the text diff tool, and the JSON minifier.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Finding which field changed between two API responses.
  • Comparing a config against a known-good version structurally.
  • Checking exactly what a transformation changed.
  • Comparing two documents whose key order differs.
  • Confirming that two payloads are structurally identical.

Frequently Asked Questions

How is this different from a text diff?
It parses both sides and compares them structurally, so reordering keys or reindenting produces no changes at all. A line-based diff on the same pair reports every moved line — noise that buries the one field that genuinely changed.
How are array elements compared?
By index. Element 0 against element 0, and so on, with any extra elements reported as added or removed. That means inserting one item at the START of an array shows every subsequent element as changed — correct by index, misleading if you think of the array as a set.
What does a path like store.books[1].price mean?
The exact location of the change: object keys joined with dots, array indices in brackets. It is the shortest description of where to look, and it pastes almost directly into JavaScript or into a JSONPath expression to pull the value out of the source.
Does key order count as a difference?
No. JSON objects are unordered by specification, so `{"a":1,"b":2}` and `{"b":2,"a":1}` compare as identical. If key order matters to your consumer — and for a signed payload or a hash it might — the diff is the wrong tool for checking it.
Are 1 and "1" reported as different?
Yes. Comparison is by type as well as value, so a number and the string containing its digits are a change. This catches a real class of bug: an API that starts serialising IDs as strings looks identical in a rendered UI and breaks every strict equality check downstream.

Common errors and gotchas

  • Using a text diff instead, which reports key reordering as a change when it is not.
  • Assuming array comparison is positional or by identity without checking which the tool does.
  • Missing that a number and its string form are different values.
  • Overlooking a key whose value changed from absent to null, which are not the same.
  • Comparing large documents and reading the noise rather than filtering to the paths you care about.

Related Developer Utilities tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate