JSON Diff Checker

Compare two JSON documents and instantly see which keys were added, removed, or changed, listed by key path. Objects and arrays are walked recursively, and even type mismatches are reported as changes. Everything runs in your browser — nothing is sent to a server.

Tips

  • Key paths are shown using dot/bracket notation like `user.address[0].city`, so you can immediately pinpoint which nested value changed, no matter how deeply the JSON is structured.
  • Arrays are compared by matching elements at the same index. Note that simply reordering an array's elements will be detected as every element having changed.
  • If the same key holds a string in one document and an object in the other, that type mismatch is also reported as a change, with both raw values shown side by side.
  • When comparing API responses before and after a deploy, strip out fields that always change, such as timestamps or request IDs, so you can focus only on the differences that actually matter.
  • Even for JSON with a huge number of unchanged values, only the count of matching leaf values is shown, keeping the result readable instead of overwhelming.

Frequently Asked Questions

It is commonly used to compare an API response before and after a deploy to catch unintended changes, or to spot differences between config files (such as config.json) across environments. Extracting only the differences is far faster than eyeballing two JSON blobs side by side.

No. Object keys are matched by name, so it makes no difference whether A and B list their keys in a different order. Only the presence of each key and whether its value matches is considered — the visual ordering in the source text is ignored.

Arrays are matched by index (0th, 1st, and so on), so even if the actual content is the same, a change in order will be detected as a change at that index. This tool does not support order-insensitive array comparison.

No. All comparison logic runs entirely in your browser's JavaScript, and the content you enter is never transmitted to any server, so it is safe to compare even responses that include API keys or personal data.

If JSON.parse fails, an error message clearly states which of A or B has the invalid format, and no diff is computed. This gives you a starting point for tracking down common mistakes like a missing comma or an unclosed quote.
ツールくん

Side Note — How key matching differs between CSV diff and JSON diff

Our CSV diff checker (dev.csv.csv_diff) compares rows and cells using a single designated key column to identify each row. JSON has no flat row-and-column structure — it allows nested objects and arrays — so even though both tools are called "diff checkers," the underlying matching algorithm is quite different. Instead of a key column, this tool uses a recursively built "key path" from the root down to each leaf as the unit of comparison.

Arrays are the trickiest part of diffing JSON. A CSV row can be uniquely identified by its key column value, but JSON array elements carry no guaranteed identifier. This tool simply matches elements by index (order of appearance), a design better suited to tracking changes in object structure or primitive values — as in config files or API responses — than to tracking additions and removals within an array's contents.

In practice, a similar idea appears in continuous integration pipelines that automatically check whether a REST API's response contract has changed. This tool favors the convenience of running entirely in the browser, but the underlying concept overlaps with snapshot testing and contract testing — mechanically detecting differences in JSON structure is a recurring challenge across many stages of software development.

→ Browse all trivia