JSON Diff & Compare
Compare two JSON documents semantically — added, removed, and changed keys with exact JSON paths.
Differences
Semantic comparison
Object key order, whitespace, and formatting are ignored. Only real differences are reported.
Exact JSON paths
Every difference includes a dot/bracket path you can paste into JSONPath, lodash.get, or your test code.
Private by design
Both documents are parsed and compared in your browser. Nothing is uploaded, logged, or stored.
Why a JSON diff beats a text diff
Plain text diffs treat JSON as a sequence of characters. That is useful for tracking edits in source control, but noisy when comparing two API responses or two configuration snapshots: reformatting, re-ordering keys, or changing indentation will all show up as differences even when the data is identical. A semantic JSON diff parses both sides and compares the actual data, so only meaningful changes are reported.
Reading the report
- Added (+) — a key or array index that is present on the right but not on the left.
- Removed (−) — a key or array index that is present on the left but not on the right.
- Changed (~) — a key that exists on both sides with different values, shown as left → right.
Each line ends with a JSON path such as $.items[2].price so you can jump directly to the affected value in code or in the source document.
Typical use cases
- Comparing two API responses while debugging a regression.
- Reviewing configuration changes between environments.
- Reading snapshot test failures without scrolling line by line.
- Auditing what an upstream service has added or removed from a payload over time.
Frequently asked questions
›What does a JSON diff tool do?
A JSON diff (or compare) tool reports the structural differences between two JSON documents. Instead of comparing text line by line — which is fragile when whitespace or key order changes — it parses both sides, walks the trees in parallel, and lists every key that was added, removed, or changed, with the exact JSON path to each difference.
›How is this different from a regular text diff?
A text diff (like git diff) compares strings. Reformatting a file, swapping the order of two keys, or changing indentation produces noise even when the data is identical. A JSON diff compares meaning: object key order is ignored by default, whitespace is irrelevant, and only real semantic differences are reported.
›How are differences classified?
Every difference falls into one of three categories. 'Added' means the key or array index exists on the right but not on the left. 'Removed' means it exists on the left but not on the right. 'Changed' means it exists on both sides with different values — for example a string changed to a different string, or a number changed to a boolean.
›What is the 'Ignore array order' option?
By default arrays are compared positionally — index 0 against index 0, index 1 against index 1, and so on. When 'Ignore array order' is enabled, arrays that contain only primitives (strings, numbers, booleans, null) are compared as multisets, so [1, 2, 3] and [3, 2, 1] are reported as identical. Arrays containing objects are still compared positionally to avoid ambiguous matches.
›Are object keys compared in order?
No. JSON object keys are unordered by specification, so the diff treats { "a": 1, "b": 2 } and { "b": 2, "a": 1 } as identical. Key reordering never shows up as a difference.
›What does the JSON path look like?
Each reported difference includes a JSON path in dot/bracket notation, for example $.user.address.city or $.items[2].price. That format is compatible with JSONPath, lodash.get, and most testing libraries, so you can paste the path straight into your code to access the differing value.
›Is my JSON sent to a server?
No. Parsing, walking, and rendering happen entirely in your browser. Neither document is uploaded, logged, or stored, which makes the tool safe for comparing API responses, configuration files, JWT payloads, and any other sensitive JSON.
›Can I copy the diff as a report?
Yes. Click 'Copy report' to put a plain-text version of the differences on your clipboard. Each line is prefixed with + (added), - (removed), or ~ (changed), followed by the JSON path and the value preview — ready to paste into a pull request comment, bug report, or commit message.
›Does the tool work on large documents?
Yes, within the limits of your browser's memory. The diff walks both trees in a single recursive pass and renders the result synchronously. Multi-megabyte documents compare in milliseconds; extremely large files are best diffed with a streaming command-line tool such as jq or diffson.
More free developer tools
Part of our growing tool belt — all client-side, all free.
JSON Formatter & Beautifier
Format, beautify, minify and validate JSON with sort keys, ASCII escape, and tree view.
Open toolJSON Validator
Strict JSON validator with precise error location, lint hints, structure stats, and duplicate key detection.
Open toolJSON Viewer
Interactive JSON tree explorer with filter, copy-path, expand/collapse all, and colour-coded types.
Open tool