All tools

JSON diff checker

Compare two JSON documents and list every change.

JSON diff checker
OriginalValid JSONJSON

Press Command or Control plus Enter to compare.

ModifiedValid JSONJSON

Press Command or Control plus Enter to compare.

Differences
Click Compare JSON to see what changed.
Ready

About the JSON diff checker

When an API response, a config file or a fixture changes, a plain text diff often shows every line as different because keys moved or the indentation changed. A JSON diff checker compares the data itself, so you only see the values that were actually added, removed or changed.

This tool parses both documents, ignores key order and whitespace, and lists each difference with its exact JSON path, such as $.author.name or $.tags[2].

How to use the JSON diff checker

  1. Paste the original JSON on the left and the modified JSON on the right, or click Load sample.
  2. Check that both editors show Valid JSON.
  3. Click Compare JSON or press Ctrl + Enter (Cmd + Enter on Mac).
  4. Read the list of differences, then click Copy result to share it.

Example

Compare two versions of a config

Input

Original:
{"name":"api","replicas":2,"env":{"LOG":"info"},"ports":[80]}

Modified:
{"name":"api","replicas":3,"env":{"LOG":"debug","TZ":"UTC"},"ports":[80]}

Output

~ $.replicas: 2 → 3
~ $.env.LOG: "info" → "debug"
+ $.env.TZ: "UTC"

Key order and whitespace don't count as changes; only values do.

Common errors and how to fix them

Every line shows as changed

A text diff tool compares lines, so reformatting or reordering keys looks like a full rewrite. A JSON diff compares parsed values, so paste both documents here instead.

Array items show as changed after one item was inserted

Arrays are compared by position, so inserting an item at the start shifts every later index. Sort both arrays the same way first if their order doesn't matter.

Unexpected token ''', "{"name": 'Ada'}" is not valid JSON

One side isn't valid JSON. Check the reported side for single quotes, trailing commas or comments, and fix them before comparing.

Good to know

  • Each line starts with a marker: + added, - removed and ~ changed. A changed line shows the old and new value, for example "1.2.0" → "1.3.0".
  • Arrays are matched item by item, so inserting one item reports a single addition instead of marking every later item as changed. Removed items show their position in the original; added and changed items show their position in the modified JSON.
  • A change of type, such as the number 1 becoming the string "1", counts as a change.
  • Long values are shortened in the list; Copy result includes them in full. Arrays with more than about 2,000 items are compared by position to keep the page fast.

Frequently asked questions

Does key order matter when comparing JSON?

No. JSON objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} contain the same data and show no differences. The order of items inside arrays does matter.

What does the $ in the paths mean?

$ is the root of the document. $.author.name means the name field inside author, and $.tags[2] means the third item of the tags array, counting from 0.

Can I compare two API responses?

Yes. Paste the old response on the left and the new one on the right. This is a quick way to spot fields that were added, renamed or changed between versions.