JSON Diff
Compare two JSON documents by structure and value, then inspect every changed path in your browser.
Compare JSON documents
Paste two valid JSON values to inspect added, removed, and changed paths.
Comparison Result
Structural differences
- Added
- 0
- Removed
- 0
- Changed
- 0
- Unchanged
- 0
| Path | Status | Before | After |
|---|
Your JSON is compared locally in your browser and is not sent to a server.
Overview
What is a JSON diff?
A JSON diff compares the parsed structure and data in two JSON documents. It helps developers review API responses, configuration revisions, fixtures, and saved state without treating indentation or object property order as meaningful changes.
Orbilyra reports added, removed, changed, and unchanged paths. Results use readable JSONPath-like locations such as $.settings.timeout and $.items[0]; they are a diagnostic report rather than a standardized patch format.
Steps
How to compare two JSON documents
- Paste the original JSON into the left editor.
- Paste the updated JSON into the right editor.
- Select Compare JSON or press Ctrl + Enter.
- Review the summary and inspect each changed path.
- Copy the text report when you need to share the result.
Example
Structural JSON comparison example
Original
{
"version": 1,
"features": ["format", "validate"],
"active": true
}Updated
{
"version": 2,
"features": ["format", "diff"],
"region": "eu-west-1"
}This comparison reports a changed version, a changed array item, a removedactive property, and an added region property.
Comparison rules
How this JSON diff treats objects and arrays
- Objects are matched by property name, so source property order is ignored.
- Arrays are compared by zero-based index because array order is significant.
- Numbers, strings, booleans, and null are compared as parsed JSON values.
- A type change, such as a number becoming a string, is reported as one changed path.
- Missing properties are distinct from properties explicitly set to null.
Workflow
JSON Diff vs Formatter vs Validator
JSON Diff answers what changed between two valid documents. TheJSON Formatter makes one valid document readable or compact, while theJSON Validator focuses on syntax errors and document structure. Validate or repair malformed input before comparing it.
Technical notes
Accuracy and comparison limits
Native JSON parsing does not preserve comments, whitespace, escape spelling, duplicate object names, or original property order. Those source-text details are therefore outside this structural comparison. The tool also blocks unsafe integer literals that native JavaScript numbers could round.
Each editor accepts up to 1,000,000 UTF-16 code units. A comparison can inspect up to 20,000 value pairs and 100 nesting levels, while the visible result table is capped at 1,000 rows. These explicit limits keep malformed or unexpectedly large data from blocking the page.
Use cases
Common JSON comparison workflows
- Review fields changed between two API responses.
- Compare configuration revisions before a deployment.
- Inspect expected and actual JSON in a failing test.
- Check whether a formatter-only change preserved the parsed data.
FAQ
Frequently asked questions
What is a JSON diff?
A JSON diff compares two parsed JSON values and reports where properties or array items were added, removed, or changed.
Does whitespace or object property order affect the comparison?
No. The tool parses both inputs first, so formatting whitespace and object property order do not create differences. Property names and parsed values still matter.
How are JSON arrays compared?
Arrays are ordered and this tool compares their items by zero-based index. Inserting an item near the start can therefore produce differences at several later indexes.
What is the difference between a missing property and null?
A missing property is reported as added or removed. A property whose value changes to or from null is reported as changed because null is an explicit JSON value.
Is the diff output a JSON Patch document?
No. The result is a readable structural report with JSONPath-like locations. It is not an RFC 6902 JSON Patch and should not be applied as one.
Can the tool safely compare very large integer literals?
The tool blocks integer literals outside JavaScript’s safe integer range before comparison. Quote identifiers or exact large integers as strings to avoid numeric rounding.
Is my JSON sent to a server?
No. Both documents are parsed and compared locally in your browser. This tool does not send the JSON to an external comparison service.