JSON Diff

Compare two JSON documents structurally and see what changed.

JSON Runs in your browser
Original
Changed
Changes

No comparison yet

Paste a document into each editor and press Compare. Because the comparison is structural, reformatting or reordering keys is not reported as a change.

Runs entirely in your browser. Your data isn't uploaded — this page makes no network request with anything you type, which you can verify in your browser's network tab. How this works.

What is the JSON Diff?

Text diffs are the wrong tool for JSON: reformat a payload or reorder its keys and every line looks changed even though nothing has. A structural diff compares the parsed values instead, so it reports what actually differs.

Paste two documents — the previous and current version of an API response, for example — and you get a list of added, removed and changed paths, with the old and new value at each one, plus a conventional line diff underneath for when you do care about the text.

How to use it

  1. Paste the original document on the left and the new one on the right.
  2. Press Compare (or Ctrl/Cmd + Enter).
  3. Read the change list: each row shows the JSON path and what happened to it.
  4. Toggle Ignore array order if the arrays are sets rather than sequences.
  5. Copy the change list as JSON or Markdown for a pull request comment.

Example

Two versions of the same config, compared by path.

Input
A: {"replicas": 2, "image": "api:1.4.0"}
B: {"replicas": 4, "image": "api:1.4.0", "canary": true}
Result
~ replicas   2 → 4
+ canary     true

1 changed, 1 added, 0 removed

Features

  • Structural comparison by JSON path, immune to formatting differences
  • Added, removed, changed and type-changed classifications
  • Optional array-order-insensitive comparison
  • Counts of each change type for a quick sense of blast radius
  • Export the diff as JSON or a Markdown table

Frequently asked questions

How are array changes reported?
By index by default, so [1,2,3] to [1,3] reads as two changes at indices 1 and 2. That is accurate but noisy for unordered arrays, so enable Ignore array order to compare them as multisets instead.
What does "type changed" mean?
The path exists in both documents but the JSON type differs — a number became a string, or an object became an array. These are called out separately because they are the changes most likely to break a client.
Can I diff two files instead of pasting?
Yes. Each side has its own Upload button, and both sides accept drag and drop.
Esc

Loading the catalog…