Skip to content
AZ Tools

JSON Diff

Compare two JSON documents structurally — see exactly which keys were added, removed, or changed.

Changes+ 1− 0~ 3
  • ~ $.age30 → 31
  • ~ $.roles[1]"editor" → "viewer"
  • ~ $.address.zip"04000" → "04001"
  • + $.address.country"KR"

How to use

  1. Paste the original JSON on the left, the new one on the right.
  2. Read the path-based change list.
  3. Parser errors show next to whichever side is invalid.

About this tool

Show

A plain text diff treats JSON as lines of characters; this one understands the structure. Paste two documents and get a typed list of changes — added paths in green, removed in red, changed values in amber — each located by a dotted path such as $.address.zip, so you can reorder keys freely without a single false difference and spot a missing field the moment it appears. Objects are matched by key and arrays by position, which is the honest thing to know about any structural diff: inserting one element at the front of a list shifts everything after it, so each following index is reported as changed rather than moved. Everything runs locally in your browser — neither document is uploaded.

Frequently asked questions

Why not just use a text diff?

Text diff is line-based and confused by re-ordered keys, different indentation, or trailing-comma style. JSON Diff compares parsed structures, so identical data with different formatting reports zero changes.

What does the path syntax mean?

JSONPath-style: $ is the root, .key is a property, [n] is an array index. So $.posts[0].tags[1] is the second tag of the first post.

How are arrays compared?

By index, item-by-item. If the lengths differ, the extra trailing items are listed as added or removed. Reordering the same items still shows changes at the differing indices.

Is anything uploaded?

No — both JSONs are parsed and diffed locally in your browser.

I inserted one item at the front and now everything is changed.

That is index-based array comparison working as designed. Position two used to hold the second item and now holds the first, so every following index genuinely differs from what was there. A move-aware diff needs a stable key per element, which JSON alone does not provide.

Two objects are identical but I reordered the keys. Any difference?

None. Objects are compared key by key, so key order is invisible here — which is the main reason to use a structural diff rather than a text one. Serialisers order keys differently, and a text diff would report a whole document as changed for that alone.

Guides on this topic

Related tools