RSRobince Studio

JSON Diff

Paste an original and a changed JSON document to see exactly which paths were added, removed or changed. Object key order is ignored, so reordering never shows up as a difference.

Runs in your browser. Your files are never uploaded.

Loading JSON Diff…

How to use JSON Diff

  1. Paste the original JSON into the left box and the changed JSON into the right box.
  2. Read the summary counts of added, removed and changed paths.
  3. Scan the colour-coded list: green is added, red is removed and orange is changed, each with its full path.
  4. Fix any invalid JSON if an error message appears above the results.

Why a structural diff helps

Two JSON documents can contain exactly the same data and still look completely different as text: one may be minified, another indented with tabs, and a third may list keys in a different order. A plain text comparison highlights all of that noise. A structural diff parses both documents and compares the resulting trees, so the only differences it shows are differences in data.

This is especially helpful when comparing API responses before and after a deployment, checking that a migration kept every field, or reviewing changes to a configuration file generated by a tool.

Reading the results

The summary line counts how many paths were added, removed and changed. Below it, each difference is listed with its full path from the root, written with $ for the root, dots for keys and square brackets for array positions.

  • Added: the path exists only in the right-hand document.
  • Removed: the path exists only in the left-hand document.
  • Changed: the path exists in both but the value or its type differs.
  • When a whole object or array is added or removed, it is listed once at its top path, with a shortened preview of its value.

Limits and tips

Because arrays are compared by index, reordered arrays of objects will look heavily changed. If order does not matter in your data, sort the arrays by a stable key before comparing. Very long values are shortened in the display, and the list shows the first 1000 differences, which is plenty for ordinary documents.

The tool needs both inputs to be valid JSON. Comments, trailing commas and single quotes are not part of the JSON standard and will produce an error that names the problem. Nothing you paste is sent anywhere, so it is safe to compare internal or confidential payloads.

Why use this json diff tool

  • Structural comparison. Documents are compared by structure and value, not as lines of text, so formatting and whitespace never matter.
  • Key-order insensitive. Objects with the same keys in a different order are treated as identical.
  • Exact paths. Every difference is shown with a path like $.user.address.city or $.items[2].
  • Private. Both documents stay in your browser and are never uploaded.

Frequently asked questions

How are arrays compared?

Arrays are compared position by position, because order is meaningful in a JSON array. If an item is inserted near the start, later items will be reported as changed. This is the safe, predictable behaviour; it does not try to guess that elements moved.

Does a number 1 equal the string "1"?

No. Values of different types are reported as changed, because they are different in JSON and often cause real bugs when a system expects one and receives the other.

Why not just use a text diff?

A text diff reports every line that was re-indented or reordered. A structural diff shows only meaningful changes, which is much easier to read when two API responses or config files were produced by different tools.

More free tools