JSON Diff
Paste two JSON documents and see what was added or removed, line by line. Object keys are sorted first, so a reordered object is not counted as a change. Everything runs in your browser, so your data is never uploaded.
How to diff JSON
- Paste the original JSON into the left box.
- Paste the changed JSON into the right box.
- Read the highlighted additions and removals below.
About comparing JSON
Comparing JSON by eye is error-prone, especially when keys are reordered or the documents are large. A semantic diff normalizes both sides — sorting object keys while preserving array order — then highlights only the lines that genuinely differ, so you see real changes instead of formatting noise.
This is useful for reviewing API responses, config changes and snapshot test output. Everything is computed in your browser, so the data you compare — which often contains real records — never leaves your device.
Reach for a diff whenever two environments disagree and the configs are supposedly identical — staging versus production settings files are a classic. It is equally useful for verifying your own edits: after hand-tweaking a large document, a diff confirms you changed exactly the fields you meant to and nothing else. And when an API upgrade breaks a client, diffing a response from each version pinpoints the renamed or missing field in seconds.
The sort-keys-but-not-arrays behaviour mirrors the JSON specification itself. An object is defined as an unordered collection — two objects with the same members are the same value regardless of the order a serializer happened to write them. Arrays, by contrast, are ordered by definition: swapping two items produces a genuinely different document. Normalizing one and not the other is what separates a semantic comparison from a naive text diff.
Frequently asked questions
How do I compare two JSON files?
Paste the original on the left and the changed version on the right. Added lines are highlighted green, removed lines red, with a count of each.
Does key order matter?
No. Both sides are re-serialized with sorted keys before comparing, so reordering the same keys shows no difference — only real value or structure changes appear.
What if my JSON is invalid?
The tool tells you which side failed to parse and why, so you can fix it before comparing.
Is my data uploaded?
No. The comparison runs entirely in your browser; nothing is sent to a server.
Why do values that look identical show as changed?
Usually a type difference. The string "1" and the number 1 print almost identically but are different JSON values, and the same goes for true versus "true" or null versus "null". This bites most often with data exported from spreadsheets or form inputs, where everything arrives as a string. The diff is telling the truth — check the quotes around the changed value.