JSON Diff
Compare two JSON documents and see added and removed lines.
Compare JSON
Differences
What does a JSON diff do?
A JSON diff compares two documents and reports what changed. Unlike a plain text diff, it understands structure, so a reordered key is not reported as a change when the value is the same.
The output marks added lines with + and removed lines with -, the same convention used by git, which makes it easy to paste into a review.
How to compare two JSON documents
- Paste the original JSON on the left.
- Paste the changed JSON on the right.
- Press Compare JSON.
- Read the + and - lines, then copy or download the diff.
JSON diff examples
A changed value and a new key
{
"name": "Ada",
"age": 36
}
---
{
"name": "Ada",
"age": 37,
"city": "London"
} {
"name": "Ada",
- "age": 36,
+ "age": 37,
+ "city": "London"
}A nested change
{"a":1,"b":{"c":2}}
---
{"a":1,"b":{"c":3}} {
"a": 1,
"b": {
- "c": 2
+ "c": 3
}
}JSON diff: UrsaKit vs other options
| Criterion | UrsaKit | Rolling your own | Typical online tool |
|---|---|---|---|
| Setup | Open the page | Install a diff tool | Open the page |
| Structure aware | Yes | Yes with a JSON plugin | Varies |
| Data leaves the device | No, runs in the browser | No | Often sent to a server |
| Output | Copy or download the diff | Depends on the tool | Usually copy only |
Frequently asked questions
Does key order matter?
No. diffJson compares values, so two objects with the same keys in a different order are treated as equal.
What do the + and - signs mean?
+ marks lines present only in the right document and - marks lines present only in the left, the same as a git diff.
What if one document is invalid?
The error names which side failed and stops before comparing, so you can fix it first.
Is my JSON uploaded?
No. The comparison runs locally in JavaScript in your browser.
Can I compare arrays?
Yes. Arrays are compared element by element, and length differences show as added or removed lines.
Can I download the result?
Yes, use Download diff to save the output as a text file.