Compare JSON files and understand the changes
A JSON diff is most useful when it tells you what changed and where, not merely that one side is red and the other is green. Start with a small before/after pair, then explain each highlighted path against the source.
JSON All-in-One compares open JSON-family tabs and marks added, removed, and changed paths. Whitespace around the same value is not the same as a data change, but arrays are compared by position rather than by business identifiers.
Use a controlled before and after pair
The pair below includes one changed scalar, one removed field, one added object, one array item changed by index, and one type change. Keep examples small enough that every highlighted line can be explained.
Use sanitized fixtures instead of live API responses. Live payloads change independently and can leak private data, tokens, or account-specific fields.
{
"id": "ord_1001",
"status": "review",
"total": 129.5,
"risk": { "score": 61, "owner": "finance" },
"items": ["api", "seat"],
"shipping": null
}{
"id": "ord_1001",
"status": "approved",
"total": "129.50",
"risk": { "score": 84 },
"items": ["api", "support", "seat"],
"shipment": { "carrier": "DHL", "tracking": "demo-123" }
}Run the comparison
Open the baseline file first, open the changed file second, then choose Compare JSON. Select the other tab as the diff target and open the diff view. The result should show a side-by-side comparison with a summary count and highlighted source lines.
Write a text summary beside the visual diff so nobody has to decode every color in an image. A good summary says $.status changed, $.risk.owner removed, and $.shipment added.
$.status changed from "review" to "approved"
$.total changed type from number to string
$.risk.score changed from 61 to 84
$.risk.owner was removed
$.items[1] changed from "seat" to "support"
$.items[2] was added as "seat"
$.shipping was removed
$.shipment was addedFormatting and property order
JSON object property order and whitespace are often noisy in text diffs. JSON All-in-One parses the values and compares the JSON structure, so {"a":1} and a pretty-printed version of the same object are treated as the same value.
Keep that distinction narrow. If comments are present in JSONC, comment text and placement can matter to the diff. If exact numeric tokens matter, review why large JSON numbers change in JavaScript before interpreting a numeric change.
Arrays are compared by index
The most important rule to document is array comparison. The diff does not infer that objects with the same id are the same business record after sorting or insertion. It compares array items by index.
In the fixture, inserting "support" at $.items[1] means the old second item appears changed and a new third item appears added. For API arrays where order is unstable, sort or reshape both sides into a comparable model before diffing.
sort_by(.id) | map({id, status, total})Review checklist
- Was a value added, removed, changed, or changed to another type?
- Is an array difference caused by insertion, deletion, sorting, or a true record change?
- Did JSONC comments move or change?
- Are numeric identifiers being compared as original tokens or downstream parsed numbers?
- Does the receiving system care about property order, even if JSON itself normally does not?
Troubleshooting
If the diff button cannot compare, make sure both sources are valid loaded JSON-family tabs, not a schema, export, chart, or previous diff result. If a result looks too noisy, reduce the input first: compare the branch or row model that actually changed.
If you are comparing commented configuration files, read JSON with comments so you know which parts are strict data and which parts are source annotations.