JSON Diff
Compare two JSON documents and see exactly what changed — added fields, removed fields, changed values and type changes, each with its own JSON path. Everything runs in your browser.
Drop JSON A here
.json / .txt · up to 10 MB · nothing leaves your device
{{ leftMeta.lines }} lines · {{ leftMeta.sizeLabel }}
Invalid JSON
Line {{ left.err.line }}, Column {{ left.err.col }}
{{ left.err.msg }}
Valid JSON
Drop JSON B here
.json / .txt · up to 10 MB · nothing leaves your device
{{ rightMeta.lines }} lines · {{ rightMeta.sizeLabel }}
Invalid JSON
Line {{ right.err.line }}, Column {{ right.err.col }}
{{ right.err.msg }}
Valid JSON
Ignore rules are active — matching properties are excluded from the comparison entirely, not just hidden.
This comparison is large enough that it was stopped early to stay responsive — the counts above are a partial view.
{{ d.type === 'added' ? '—' : valuePreview(d, 'left') }}{{ d.type === 'removed' ? '—' : valuePreview(d, 'right') }}{{ d.note }}
No differences match the current filter.
− {{ valuePreview(d, 'left') }}+ {{ valuePreview(d, 'right') }}= {{ valuePreview(d, 'left') }}
{{ d.note }}
No differences match the current filter.
- {{ row.node.key }} {{ treeValue(row.node) }} {{ typeLabel(treeStatus(row.node)) }}
Only the first {{ treeRows.length }} rows are shown. Collapse a branch or narrow the filter to see more.
No differences match the current filter.
Paste or drop JSON A and JSON B above, then press Compare JSON.
Both documents are parsed and compared entirely in your browser. Neither one is ever uploaded to a server.
About comparing JSON
Comparing two JSON documents as text — line by line — reports a difference every time
whitespace or key order changes, even when nothing structural has changed at all. This tool
parses both documents first and compares the resulting values, so {"name":"John"}
and a re-indented, re-ordered version of the same object come back identical.
Does key order matter?
Not by default. Two JSON objects are the same structural value regardless of which order their properties were written in, so Ignore object key order is on unless you turn it off. Turning it off adds one explicit note wherever two objects hold the same keys and values in a different sequence — useful when a raw ordering guarantee genuinely matters to your pipeline.
How are JSON arrays compared?
By position, by default: index 0 is compared against index 0, and so on — reordering
["apple","banana"] into ["banana","apple"] is two changes. Turn on
Ignore array order to compare arrays as unordered collections instead: elements
that are exactly equal on both sides cancel out first (duplicates match duplicates one for one),
then any leftover objects or arrays on each side are paired up in their original order and diffed
against each other, and only what's left after that becomes a plain addition or removal.
What is a JSON path?
Every difference is labelled with the exact location it was found at, such as
$.user.address.city or $.items[0].price — the same dotted/bracket
notation used by jq and most JSON tooling, ready to paste into a filter, a test
assertion, or a bug report.
Working with a single document instead?
Use the JSON Formatter to format, minify, validate or explore one document's structure before comparing it here.
Frequently asked questions
What is a JSON diff tool?
It parses two JSON documents into their actual structure, then compares that structure rather than the raw text — so re-indenting or reordering keys never shows up as a false difference. What is left is added, removed, changed and type-changed values, each with the exact path to find it.
Does property order matter?
Not by default — two objects with the same keys and values are identical regardless of the order they were written in. Turn off "Ignore object key order" if a raw ordering guarantee genuinely matters to your workflow; the tool will then flag objects that hold the same data in a different sequence.
Can I compare JSON arrays?
Yes, in two modes. By default, arrays are compared by position, so moving an item counts as a change at both positions it touched. Turn on "Ignore array order" to compare arrays as collections instead — matching elements cancel out wherever they ended up, and only genuinely added or removed items are reported.
Can the tool detect type changes?
Yes. A value that changes type — a number becoming a string, a boolean becoming null, an object becoming an array — is reported as its own category, separate from an ordinary value change, since that kind of change is far more likely to break something reading the data.
Can I ignore selected fields?
Yes. List key names to ignore everywhere they appear (useful for IDs, timestamps, request IDs), or list exact JSON paths to ignore one specific location. Ignored properties are excluded from the comparison entirely, not just hidden from the results.
What does a JSON path mean?
It is the exact location of a value inside the document, such as $.user.address.city or $.items[0].price — the same dotted/bracket notation used by jq and most JSON tooling, so you can paste it straight into a filter or a test.