datapry

JSON Diff

Compare two JSON documents and see every added, removed and changed value by path. Runs in your browser, so nothing is uploaded.

Original JSON

Changed JSON

Differences

Paste two JSON documents to compare them.

Waiting for input

About this tool

Text diffs flag every moved key and reformatted line. This tool compares the data itself and lists each difference by its path, such as $.limits.projects. Array items can be matched by a field like id, so a reordered list doesn't show up as every item changing. The side-by-side view shows both documents normalized.

How to use it

  1. Paste the original JSON on top and the changed JSON below.
  2. Choose whether key order matters and how array items are matched.
  3. Review the change list, then copy or download it as JSON.

Example

Input
{"name":"Riya","plan":"free","seats":1}
Output
{
  "summary": {
    "added": 1,
    "removed": 0,
    "changed": 1
  },
  "changes": [
    {
      "kind": "changed",
      "path": "$.plan",
      "before": "\"free\"",
      "after": "\"pro\""
    },
    {
      "kind": "added",
      "path": "$.trial",
      "after": "false"
    }
  ]
}

This is the change list you get from Copy or Download.

Questions

Does key order count as a difference?
Not by default, since JSON objects have no meaningful key order. Turn off "Ignore key order" if your consumer depends on it.
How are arrays compared?
By position, unless you enter a field in "Match array items by". With id, an item with id 7 is compared with the item with id 7 on the other side, wherever it is.
Are 1 and 1.0 different?
Not with "1.0 equals 1" on, which compares numbers by value. Turn it off to treat any change in how a number is written as a difference. Large numbers are compared exactly, never rounded.