JSON Diff

Compare two JSON documents by structure. Key order is ignored, numbers are compared by value, and each added, removed or changed field shows its path.

Differences

Enter JSON on both sides to see the differences.

Change Path Original Changed

Click a row to highlight it on both sides.

What is JSON diff?

A plain text diff shows many changes when only the formatting, indentation or key order differ. This tool parses both sides as JSON first and lists only the data that really changed, for example an API response before and after a release, or the configuration of two environments.

How to use

  1. Paste the original JSON on the left and the changed JSON on the right. With "Compare as you type" on, the differences appear right away.
  2. Each difference shows its type (added, removed, changed) and JSON path, such as $.order.items[0].price.
  3. Click a difference to highlight it on both sides. "Copy report" copies a text version for a pull request or a document.

How JSON is compared

Example

Original {"name":"Keyboard","price":980.00,"tags":["office","usb"]}, changed {"price":980,"name":"Keyboard Pro","tags":["office","bluetooth"],"color":"black"}. The report is:

~ $.name: "Keyboard" → "Keyboard Pro"
~ $.tags[1]: "usb" → "bluetooth"
+ $.color: "black"

price went from 980.00 to 980, which is the same value, so it is not listed.

FAQ

What do +, - and ~ mean in the report?

+ is a field added on the right, - is a field removed on the right, and ~ is a field on both sides with different values: the original value is left of the arrow and the new value is on the right.

Why does a reordered array show many differences?

Arrays are ordered in JSON: [1, 2] and [2, 1] are different data, so every position is compared. If the order does not matter, sort the array in the program that produces the JSON before comparing.

What if one side is not valid JSON?

The message says which side is wrong and gives the line and column; click "Go to error" to find it. Missing or extra commas can be fixed with "Repair" in the JSON Formatter.