JSON Diff — Compare Two JSON Files Online Compare two JSON documents by structure and value.
100% offline
A
B
Diff
+32
1{1{
2 "name": "anvil",2 "name": "anvil",
3 "stable": true,
3 "tags": [4 "tags": [
4 "a",5 "a",
5 "b"6 "c"
6 ],7 ],
7 "version": 18 "version": 2
8}9}

About JSON Diff — Compare Two JSON Files Online

A semantic JSON diff compares two JSON documents by their structure and values rather than as raw text — so reordering keys, reformatting whitespace, or re-indenting never shows up as a difference. It reports exactly which paths were added, removed, or changed, with the before and after values for each one.

That's the difference between a JSON diff and a plain text diff: `{"a":1,"b":2}` and `{"b":2,"a":1}` are identical to this tool, even though a line-based diff would flag every line. It's the fastest way to compare two API responses, review a config change, or confirm a migration produced the data you expected.

Everything runs entirely in your browser. Nothing you paste is uploaded, which makes it safe for API payloads, configuration, and other sensitive data.

Features

  • Compares by structure and value — key order is ignored
  • Reports added, removed, and changed paths with JSON-path labels
  • Colour-coded results with before/after values
  • Live added / removed / changed counts
  • Fully offline — your JSON never leaves the browser

How to use

  1. Paste the first JSON document into the A pane.
  2. Paste the second JSON document into the B pane.
  3. Read the diff below: each row shows the path, change type, and the before/after values.

Frequently asked questions

How is this different from a text diff?

A text diff compares the two inputs line by line, so reordered keys, different indentation, or whitespace changes all appear as differences. This tool parses both documents and compares them structurally, so only genuine changes to keys and values are reported.

Does key order matter?

No. Object keys are compared by name, not position, so {"a":1,"b":2} and {"b":2,"a":1} are reported as identical. Array elements are compared by index, because order is meaningful in JSON arrays.

What do the paths mean?

Each difference is labelled with a JSON path. Object keys use dotted notation (a.b) and array elements use bracketed indices (a[0]), so a.items[2].name points to the name field of the third element of the items array.

Is my JSON sent to a server?

No. Both documents are parsed and compared entirely in your browser using local JavaScript. Nothing you paste is uploaded, which makes it safe for API payloads, secrets, and configuration.

Everything runs locally in your browser — your input is never uploaded.