JSON Diff

Compare two JSON documents, such as an API response before and after a change, or two environments’ config files. Instead of a line-by-line text diff, the tool compares the data itself, so reordered keys and different formatting do not count as changes. Each difference is listed with its exact path, like $.items[2].price.

Runs in your browser · Your data never leaves your device

Loading the tool…

Tip: results update as you type. Open file and Paste go into the box you last clicked.

How to use the JSON Diff

  1. Paste the original JSON in the first box and the changed JSON in the second, or open files. Open file and Paste go into the box you last clicked.
  2. Optionally list keys to ignore, such as updated_at or request_id.
  3. Choose whether array order matters. By default [1, 2] and [2, 1] are different.
  4. Read the list of added (+), removed (-) and changed (~) paths, then copy or save it as text or JSON.

How differences are found

Objects
Keys are matched by name, so key order and whitespace never count as differences. A key only in the changed JSON is added; only in the original, removed.
Arrays
With order checking on, items are compared by position. With Ignore array order, equal items are paired wherever they are, and only the items without a partner are reported.
Values and types
Numbers are compared by value, so 10 and 10.0 are equal. A value whose type changes, such as "10" to 10, is reported with both types.
Ignored keys
A plain name such as updated_at is ignored at every level. A path such as meta.version (or $.meta.version) is ignored only there. Separate entries with commas or new lines.

Examples

These outputs were produced by the same code that runs in the tool above.

Compare two versions of an order

The status and a quantity changed, a coupon was added and the note was removed. updated_at is ignored because it changes on every request.

JSON 1

{
  "id": 5512,
  "status": "pending",
  "updated_at": "2026-11-01T10:00:00Z",
  "note": "Leave at reception",
  "items": [
    {"sku": "ZV-1001", "qty": 2},
    {"sku": "ZV-1002", "qty": 1}
  ]
}

JSON 2

{
  "id": 5512,
  "status": "paid",
  "updated_at": "2026-11-02T08:30:00Z",
  "coupon": "AUTUMN10",
  "items": [
    {"sku": "ZV-1001", "qty": 3},
    {"sku": "ZV-1002", "qty": 1}
  ]
}

Differences

4 differences: 1 added, 1 removed, 2 changed (ignoring listed keys)

~ $.status: "pending" → "paid"
- $.note: "Leave at reception"
~ $.items[0].qty: 2 → 3
+ $.coupon: "AUTUMN10"

Ignore array order

The same permissions in a different order are not reported when array order is ignored; only the new permission is.

JSON 1

{"role": "editor", "permissions": ["read", "write", "comment"]}

JSON 2

{"role": "editor", "permissions": ["comment", "read", "write", "publish"]}

Differences

1 difference: 1 added, 0 removed, 0 changed

+ $.permissions[3]: "publish"

Frequently asked questions

Is this the same as a text diff?

No. A text diff compares lines, so reformatting or reordering keys shows up as changes. This tool compares the parsed data, so only real changes to values are listed.

How are paths written?

Paths start at $ (the root). Object keys use dots, like $.user.name, and array items use their index, like $.items[0]. Keys with spaces or symbols use brackets, like $["first name"].

Can I use the result in code?

Choose the JSON report to get an array of {op, path, before, after} objects that you can process in scripts or tests.

Is my data uploaded?

No. Both documents are compared on your device and never leave it.

Limitations and edge cases

  • With Ignore array order, matching is exact: an item with one changed field has no equal partner, so it is compared with a leftover item at the same position.
  • Ignore array order compares every pair of items, so very large arrays (tens of thousands of items) can be slow.
  • In the browser, integers above 9,007,199,254,740,991 may be compared after rounding, because JavaScript numbers cannot hold them exactly.

Read the privacy policy for how the site handles data.