b2KIT

JSON Diff Tool

Upload or paste two JSON files and see a visual tree diff showing added, removed, and changed fields. Collapsible nodes.

How to Use JSON Diff Tool

  1. 1

    Paste first JSON

    Enter the original JSON document in the left panel.

  2. 2

    Paste second JSON

    Enter the modified JSON document in the right panel.

  3. 3

    View the differences

    See additions, deletions, and changes highlighted with colors.

Tested tool guide Tested browser tools Checked August 16, 2026

What JSON Diff Tool does, with a checked example

Paste or upload two JSON documents and this tool walks both at once, building a tree of the differences: keys that exist only in the first document are marked removed, keys only in the second are marked added, and shared keys with different values are marked changed. Results appear as a color-coded tree with collapsible branches, so unchanged subtrees fold away and you land directly on what moved. The comparison runs entirely in your browser - nothing is uploaded. First-time users are often surprised that arrays are compared position by position: inserting one element near the front flags every following element as changed, even when the content is identical.

Worked example

A concrete input and expected output from the current implementation.

Input

Left: {"name": "Alpha", "version": 2, "tags": ["a", "b"]}
Right: {"name": "Alpha", "version": 3, "tags": ["a", "c"], "owner": "dev"}

Expected output

Three paths are flagged: version changed 2 -> 3; tags[1] changed "b" -> "c"; owner added with value "dev". The name and tags[0] nodes are unchanged and render without a marker.

The two documents agree on everything except three paths, so the tree flags exactly those: one scalar changed, one array element changed, and one key appears only on the right side. Keys are matched by name, so the unchanged name and first tag produce no report.

How the result is produced

1

How the walk works

The tool compares the two documents as value trees, walking them in lockstep. Objects are matched key by key with key order ignored; a key present on only one side is reported as added or removed, and a key on both sides with different values is reported as changed. Arrays are matched element by element by index. Scalars differ when their values differ, and type matters, so 2 and "2" count as a change.

2

Reading the result

Changes render as an indented tree that mirrors the document structure, with added and removed nodes highlighted and changed nodes showing the old and new value side by side. Every branch is collapsible, so subtrees with no differences fold to a single line, and a summary shows the total count of added, removed, and changed paths.

Good uses

  • After a backend or API change, diff an old response payload against the new one to see exactly which fields changed or disappeared before updating your client code.
  • Audit a configuration file or manifest (package.json, settings JSON) before and after a merge or migration to catch silently dropped keys or altered defaults.
  • Verify a data transformation: diff the input of a conversion script against its JSON output to confirm no fields were lost and only the intended values changed.

Limits and checks

  • Array diffs are positional: a single insert at index 0 shifts every later element, so each one reports as changed even when nothing was edited. A change marker at array index N means the slot changed, not necessarily that the value at N was modified.
  • The comparison is type-sensitive: 2 and "2" are different, as are true and "true". A reported change may be a type flip or a string-to-number mismatch rather than an actual value edit.
  • Object key order never produces a diff, but array element order does. Reordering object keys is silent; reordering array entries is reported as a cascade of changes.

Common questions

Does the comparison happen on a server?

No. Both documents are parsed and compared inside your browser and nothing is uploaded, so it is safe to paste JSON containing tokens or other sensitive values. The tradeoff is practical rather than privacy-related: extremely large documents compare noticeably slower on older machines.

Why does the entire tail of my array show as changed after one insert?

Because array elements are matched by index, not by content. Element 0 of the old array is compared with element 0 of the new one, and so on. A single insertion shifts everything down by one, so every shifted element is compared against a different neighbor and reported as changed even though no element was edited.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools