JSON Diff
JSON Diff pretty-prints both of your JSON documents and shows a clean, color-coded line-by-line diff — added lines in green, removed lines in red — the way you would see a change in version control.
Because both sides are normalized with consistent indentation first, the diff highlights real changes instead of formatting noise. It all runs in your browser.
How to use JSON Diff
- 1
Paste both versions
Put the original in A and the changed version in B.
- 2
Read the diff
Both documents are formatted, then compared line by line with markers.
- 3
Spot the changes
Green lines were added, red lines were removed, unchanged lines stay neutral.
How the diff is computed
Each document is parsed and re-serialized with two-space indentation so the two sides share a consistent layout. A longest-common-subsequence algorithm then aligns the lines and marks the insertions and deletions, exactly like a unified diff.
Normalizing first means a document that was minified and one that was pretty-printed will diff as identical if their data matches.
When to use a diff vs a compare
A line diff is great for eyeballing what changed and roughly where, especially in larger documents. If you instead want a precise list of which paths were added, removed or changed regardless of order, use the JSON Compare tool.
The two complement each other: compare for structure, diff for a readable visual review.
Frequently asked questions
- Does it ignore formatting differences?
- Yes. Both documents are re-formatted with the same indentation before diffing, so only data changes show up.
- How is this different from JSON Compare?
- JSON Diff shows a line-by-line visual diff. JSON Compare lists structural differences by path and ignores key order.
- Is my data sent anywhere?
- No. Parsing and diffing happen entirely in your browser.
Last updated: