JSON Diff
Paste two JSON documents to see a structural diff — every field that was added, removed, or changed, listed by path. Unlike a text diff, key order and whitespace don't matter.
How to use it
- Paste the original document into JSON A (before) and the updated document into JSON B (after).
- Select Compare or press Ctrl/⌘ + Enter.
- Review every added, removed, and changed value by its JSON path.
- Download the text report when you need to attach the comparison to an issue or review.
JSON comparison example
Suppose an API response changes from this document:
{"user":{"id":42,"plan":"free"},"active":true}
to this version:
{"user":{"id":42,"plan":"pro","region":"eu"},"active":false}
The result reports $.user.plan as changed from "free" to "pro", $.user.region as added, and $.active as changed from true to false. Whitespace and object key order are ignored because both inputs are parsed before comparison.
How to read the diff
An added result exists only in JSON B. A removed result exists only in JSON A. A changed result exists at the same path in both documents but has a different value or type. Paths begin with $; object keys use dot notation and array positions use brackets, such as $.users[0].email.
This structural approach is more useful than a line-by-line text diff for formatted API responses and configuration files. Reformatting a document or moving an object key does not create noise, so the report stays focused on data changes.
Common JSON diff use cases
- Compare an API response before and after a deployment.
- Review configuration changes between development and production.
- Check generated fixtures or snapshots during a regression investigation.
- Inspect webhook payload changes from two delivery attempts.
- Confirm whether a formatter changed data or only whitespace.
Both documents must be valid JSON. If either side fails to parse, the tool identifies which input is invalid and shows its line and column. Use JSON Validator for a focused syntax check or JSON Repair for common JSON5, JavaScript, and Python-style syntax mistakes.
Array comparison and limitations
Arrays are compared by position: index zero with index zero, index one with index one, and so on. This is predictable for ordered API data, but inserting an item near the beginning can make later positions appear changed. The tool does not attempt identity matching or longest-common-subsequence alignment. For arrays of records, sorting both inputs by a stable identifier before comparison often produces a clearer report.
JSON Diff reports value changes, not business impact. A removed field may be harmless in one response and breaking in another. OpenAPI contract changes need schema-aware rules, which is the purpose of OpenAPI Validator and API Guard. Parsing and comparison happen entirely in the current browser tab; pasted documents are not uploaded to Cryonel.
Frequently Asked Questions
Does key order matter?
No. This is a structural diff, not a text diff — objects are compared by key, so reordering keys never shows up as a change.
How are arrays compared?
Arrays are compared position by position (index 0 vs index 0, and so on). Inserting an item in the middle of an array will show every following item as "changed" rather than detecting the shift — a full list-alignment (LCS) diff isn't implemented.
Are my JSON documents uploaded?
No. Parsing and comparison run in your browser. Cryonel does not receive the JSON documents you paste or open with the local file picker.