Back to All Tools

JSON Diff

Compare two JSON documents structurally — added, removed and changed values are flagged with their full path.

Runs entirely in your browser — nothing is uploaded

About the JSON Diff

JSON Diff compares two JSON documents and tells you exactly what changed between them. Instead of eyeballing two blobs of text and hoping you catch a flipped boolean or a renamed key, you paste one version on the Left, one on the Right, and get a list of every difference. Each is labeled added, removed, or changed, and pinned to the exact path where it lives.

The tool walks both documents in parallel. Objects are matched by key, so a key on one side but not the other is flagged added or removed. Arrays are matched by index, element for element. When it reaches two plain values at the same path, it marks a change if they differ. Every result carries a path like $.role or $[2].name, plus the before and after values for anything changed.

Both documents are compared in the browser, so it stays free and needs no sign-in. Nothing you paste is uploaded or sent anywhere; parsing and comparison happen in JavaScript on your own machine. So you can safely compare API responses, config files, or records that hold internal data without them leaving your computer, and it keeps working once the page has loaded even with no network.

How to use the JSON Diff

  1. 1Paste your first JSON document into the Left box, replacing the sample object loaded by default.
  2. 2Paste the version you want to compare against into the Right box.
  3. 3Click Compare to parse both sides and list differences.
  4. 4Read the added, removed, and changed counts at the top, then scan each row's path.
  5. 5For changed rows, check the struck-through before value and the after value past the arrow.
  6. 6Click Clear to empty both boxes and results for a fresh comparison.

What you can use it for

Reviewing config changes

Before deploying an edited settings file, drop the old JSON on the Left and the new one on the Right. The added and removed counts catch keys you forgot you touched, and changed rows show every value you flipped before it ships.

Debugging API responses

When an endpoint starts behaving differently, save a known-good response and the new one. Comparing them pinpoints the exact field that changed, whether a status went from active to inactive or a nested object gained an unexpected key.

Verifying a migration

After transforming or re-serializing a record, compare the source against the output. If the result reads Documents are identical, the transform preserved everything. If not, each path tells you which field drifted.

Structural diff versus text diff

A plain text diff compares JSON as lines of characters, so reformatting, reindenting, or reordering object keys can light up as dozens of differences even when the data is identical. This tool parses both sides into real values first, then walks the trees. Because it matches object keys by name rather than position, whitespace and key-order noise disappear and you only see differences that actually alter the data.

The trade-off shows up with arrays. Since elements are matched by index, the tool is precise for in-place edits but naive about insertions. Add an item to the front of a list and every later element lines up against a different neighbor, producing a cascade of changed rows. Keep that in mind and use a stable order where you can.

Frequently asked questions

Does my JSON get uploaded when comparing two documents?

No. Both documents are parsed and compared by JavaScript running in your browser tab. There is no server request involved, so the data you paste stays on your machine. You can compare sensitive payloads, and the tool keeps working with no network connection.

What do the paths like $.role and $[0] mean?

The $ is the root of the document. A dot followed by a name, such as $.role, points to an object key. Square brackets with a number, such as $[0] or $.items[2], point to an array position. Nested paths chain these together to locate any value however deep it sits.

How are arrays compared?

Arrays are matched strictly by index, position by position. Element zero on the Left is compared to element zero on the Right, and so on. If one array is longer, the extra tail items are reported as added or removed. Inserting an item at the start shifts every later element and shows up as many changes.

What happens if one side is not valid JSON?

The tool parses both boxes when you click Compare. If either side fails, it shows the parser's error message in red and displays no results. Fix the reported syntax problem, such as a trailing comma or an unquoted key, and click Compare again.

Does key order in objects matter?

No. Objects are compared by key name, not by the order keys appear, so reordering the same keys produces no differences. Order only matters inside arrays, where each element is compared against the element at the same index on the other side.