JSON Diff

Paste two versions of a JSON document. Every value that was added, removed or changed is listed with its path, and key order and spacing are ignored.

How it works

Both documents are parsed with a parser that keeps the exact text of numbers. Then the two trees are walked side by side.

Objects are compared key by key, whatever order the keys are in. Arrays are compared item by item, by position. Numbers are compared by value, so 1, 1.0 and 1e0 are equal. A value that changes type, such as a number that became a string, is one change.

Each difference is listed with its path, such as $.plan.seats, and its old and new value.

How to use it

  1. 1 Paste the original JSON on the left.
  2. 2 Paste the changed JSON on the right.
  3. 3 Read the summary and the list of changes. + is added, − is removed and ~ is changed.
  4. 4 Press Copy the report to get one line per change, for a ticket or a code review.

Good to know

  • Comparing two API responses? Paste them as they are. Different key order or spacing does not count as a change.
  • An item inserted at the top of an array makes every later item look changed, because items are matched by position. Sort both arrays the same way first if order does not matter.
  • For a line-by-line text comparison that shows formatting changes too, use the Diff Checker.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Why a text diff is the wrong tool for JSON

When two JSON files differ, the first idea is to run a normal text diff on them. That works when both files were written by the same program in the same way. It fails as soon as they were not. One API returns keys in a different order. One file is formatted with two spaces and the other with four, or on one line. A text diff then shows almost every line as changed, and the one real change is lost in the noise. JSON is data, not text, so it needs a comparison that reads the data.

This tool parses both documents and compares the values. Objects are compared key by key, whatever order the keys are in, so reordering is not a change. Spacing and line breaks do not exist after parsing, so formatting is not a change either. Numbers are compared by value, so 1.0 and 1 are the same. A number that became a string is reported, because "1" and 1 are different types and code that reads them behaves differently. Large numbers are compared from their exact text, so two IDs that differ in their last digit are told apart.

Each difference is reported with its path, such as $.items[3].price, and its old and new values. Added values are marked +, removed values −, and changed values ~. The summary counts each kind. Copy the report to get one line per change, in a plain format that reads well in a ticket, a chat message or a pull request comment. Seeing $.config.timeout: 30 → 60 is clearer than finding the same change inside a page of reformatted lines.

Arrays are the one place to think carefully. Items are compared by position: the first with the first, the second with the second. That is right for lists where position means something, such as coordinates or steps. For lists of records where order does not matter, inserting one record at the top shifts all the others, and each position shows as changed. The tool does not match records by an ID field. If order is not meaningful in your data, sort both lists the same way before comparing.

Both documents stay in your browser. That makes the tool safe for comparing API responses, configuration exports or database records that contain personal data or secrets. It takes up to 2 MB of JSON on each side and lists the first 2,000 changes on the page; the copied report always has every change.

Frequently asked questions

Does key order matter?

No. {"a":1,"b":2} and {"b":2,"a":1} hold the same data, and the tool reports no difference.

Why does one inserted array item show many changes?

Array items are compared by position: the first with the first, the second with the second. Insert one item at the start and every item after it moves, so each position shows a change. Matching items by an ID is not supported.

Are 1 and 1.0 different?

No. Numbers are compared by value, so 1, 1.0 and 1e0 are equal. A number and a string are always different, so 1 and "1" are a change.

Is my data uploaded?

No. Both documents are parsed and compared in this page, up to 2 MB each.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.