JSON Diff

Compare two JSON objects and see added, removed, and changed fields

Ad placeholder (leaderboard)

Compare two JSON documents and see precisely what changed — every added, removed and modified field, addressed by its dot path and color-coded. The diff runs entirely in your browser with JSON.parse and a recursive structural walk; nothing is uploaded.

How it works

The tool parses both inputs, then recursively compares the two values:

  • Objects are compared key by key. A key in both with differing values is a change; a key only in the right document is an addition; a key only in the left is a removal.
  • Arrays are compared by index — element 0 against element 0. Extra elements in the longer array are additions or removals.
  • Primitives (string, number, boolean, null) are compared with strict equality. A type change, such as "42" versus 42, is reported as a change.

Each leaf difference is recorded with its full dot path, for example:

+ user.roles[2]        = "admin"        (added)
- user.legacyId                          (removed)
~ server.port          42 → 8080        (changed)

Because objects are unordered, reformatting or reordering keys produces no differences — only real value changes show up. Array order, however, is significant.

Tips

  • To compare two API responses, paste each whole body; the dot paths make it easy to locate a changed field deep in a nested structure.
  • If you see a long list of array changes after only a small edit, an element was likely inserted near the front, shifting every later index — positional diffing reports each shifted slot.
  • Pretty-print or minify makes no difference to the result; whitespace is irrelevant once parsed.
Ad placeholder (rectangle)