About the JSON Diff
When an API response changes or a config file drifts, you want to see exactly what is different. This JSON diff tool puts two documents side by side and compares them line by line, marking lines that were removed from the original in red and lines that appear in the modified version in green.
How it works
Both inputs are parsed as JSON. Each document is pretty-printed with two-space indentation and its object keys sorted alphabetically at every level, so minified and formatted versions, or the same keys in a different order, produce identical text.
The normalized documents are then compared with the same line-alignment algorithm as the Text Diff tool, and the changed words are highlighted. If either side isn't valid JSON, the parse error is shown instead.
How to use
- 1
Paste or open the older JSON in Original.
- 2
Paste or open the newer JSON in Modified.
- 3
Read the differences: removed lines in red, added lines in green, changed values highlighted.
- 4
Use Only changes to focus on what differs in large documents.
Worked examples
Changed value
A version number changed in package metadata.
All other lines are shown unchanged.
Inserted key
A new key was added near the top of an object.
Because lines are compared by position, an insertion shifts the rest of the file. Add new keys at the end, or compare smaller sections, to keep the result readable.
Frequently asked questions
Does key order matter when comparing JSON?+
No. Keys are sorted at every level before comparing, so the same data with keys in a different order shows no differences.
Can this compare deeply nested JSON structures?+
Yes. Both documents are pretty-printed one key per line, so a change deep inside is shown on its own line with its parent keys around it.
Will one change mark the rest of the document as changed?+
It shouldn't be. Lines are aligned by content, and both sides are normalized first, so only real data changes show up.
Does it validate my JSON?+
Yes. Both sides are parsed first, and if either isn't valid JSON the error is shown instead of a diff.
Is my data sent to a server?+
No. The comparison runs entirely in your browser.