Toolstia / JSON diff

Compare two JSON documents

A plain text diff gets confused when keys move or spacing changes. This tool reads both documents as JSON and compares the data itself, so only real differences show up.

Each difference is listed with its path, such as $.user.roles[1], and marked as added, removed or changed.

Paste both JSON documents to compare them.

How it works

  1. Paste the original JSON on the left and the changed JSON on the right.
  2. Read the list of differences below.
  3. Copy the list if you want to share it.

Key order does not matter

Objects with the same keys and values are equal whatever order the keys are written in, and whitespace is ignored.

Arrays are compared by position

Item 0 is compared with item 0, and so on. If you insert an item at the start of a list, later items will show as changed. This keeps the result simple and predictable.

Paths

A path starts at $ for the top level. Keys follow dots, list positions use square brackets, and keys with unusual characters are written like ["first-name"].

Errors

If either side is not valid JSON, the message from the parser is shown under that side so you can find the mistake.

Questions

Does 1 equal 1.0?

Yes, they are the same number in JSON.

Does it compare a string "1" with the number 1?

It reports them as changed because the types differ.

Is anything uploaded?

No. Your JSON stays in your browser and is never sent anywhere.