JSON diff

Paste the original and the changed JSON. Every difference is listed with its path, such as $.dimensions.width, and the old and new value. Key order does not matter, and arrays can be compared by position or as unordered lists.

Compare arrays

2 added, 1 removed, 4 changed

  • Changed$.version"1.2.0" → "1.3.0"
  • Changed$.tags[1]"b" → "c"
  • Changed$.tags[2]"c" → "d"
  • Changed$.dimensions.width10 → 12
  • Added$.dimensions.depth2
  • Removed$.stock14
  • Added$.price9.5

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Paste the original JSON on the left and the changed JSON on the right.
  2. Choose how arrays are compared.
  3. Read the list of differences, or copy it as a plain-text report.

How it works

Both documents are parsed. Objects are compared key by key: a key only on the left is removed, a key only on the right is added, and a key on both sides is compared again, one level deeper. Two values that are not both objects or both arrays are changed if they are not equal.

Example

Original {"width": 10, "stock": 14}, changed {"width": 12, "price": 9.5}:

~ $.width: 10 → 12
- $.stock: 14
+ $.price: 9.5

Tips

Use By value for lists where order carries no meaning, such as tags or permissions. Use By position when order matters, such as steps or coordinates. The copied report uses +, - and ~ at the start of each line, so it reads well in a pull-request comment.

Frequently asked questions

How is this different from a text diff?

A text diff compares lines, so reformatting or reordering keys shows up as changes. This tool compares the data. Key order and spacing are ignored, and each difference is reported with the path to the value.

What is the difference between the two array modes?

By position compares item 0 with item 0, item 1 with item 1 and so on, so inserting one item at the start changes every position after it. By value ignores order: an item counts as unchanged if an equal item exists on the other side, and only items without a partner are reported as added or removed.

How are paths written?

$ is the whole document. Keys that are plain names are written with a dot ($.user.name), other keys in brackets with quotes ($["first name"]), and array positions as numbers ($.tags[1]).

What counts as changed?

A value that is different at the same path, including a change of type, for example a number that became a string or an object that became an array. 1 and 1.0 are the same number.

Is my JSON sent anywhere?

No. Both documents are parsed and compared in your browser.

More in Developer

All tools in this category: Developer ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.