Why structural diff, not string diff?
A text diff treats {"a":1,"b":2} and {"b":2,"a":1} as different. A structural diff
correctly reports them as equivalent. This tool walks both JSON trees node-by-node, compares values,
and reports the differences with their full path in dot/bracket notation — e.g., user.tags[2].
How differences are classified
- Added — the path exists in B but not in A.
- Removed — the path exists in A but not in B.
- Changed — both have the path but values differ.
- Unchanged — identical in both (not shown in diff output).
Array diff strategy
This tool compares arrays index-by-index. So [1,2,3] vs [2,3,4] reports every
slot as changed — it does not attempt to detect shifted elements. For semantically "moved item" tracking,
you want a myers-diff-style algorithm (not provided here). For most config-comparison and
API-response-comparison use, index-wise diff is what you want.
Related: JSON Patch vs JSON Diff
JSON Patch (RFC 6902) is an operation format: [{"op":"replace", "path":"/a", "value":2}].
It's what you apply. This tool shows the human-readable diff, not a patch document — they serve
different needs. Patch-emitting mode is on the roadmap.
FAQ
Can I diff JSON5 / YAML?
Use the YAML → JSON converter first, then paste both sides here.
Does it handle huge documents?
Runs comfortably up to a few megabytes of each side. The diff is O(n) in the number of nodes; memory is the main limit.
Is it private?
Yes. Both inputs parse and diff entirely in your browser.
Related tools
- JSON Formatter — Format, validate, and beautify JSON online. 100% client-side — your data never leaves your browser.
- XML Formatter — Format, validate, and beautify XML documents.
- YAML ↔ JSON Converter — Convert between YAML and JSON formats with full fidelity.
- CSV to JSON Converter — Convert CSV files to JSON with proper quoting and escaping.
Pillar
Part of Data & Format — JSON, YAML, XML, CSV, SQL, Markdown.
Written by Mian Ali Khalid. Last updated 2026-04-25.