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

  1. Paste the original JSON on the left.
  2. Paste the changed JSON on the right.
  3. Press Compare JSON.
  4. 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

CriterionUrsaKitRolling your ownTypical online tool
SetupOpen the pageInstall a diff toolOpen the page
Structure awareYesYes with a JSON pluginVaries
Data leaves the deviceNo, runs in the browserNoOften sent to a server
OutputCopy or download the diffDepends on the toolUsually copy only
FAQ

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.

All Tools