How to use the JSON Diff
- Paste the original JSON on the left and the changed version on the right. Both are validated as you type.
- Read the summary: how many values were added, removed or changed.
- Each difference shows its path (for example $.dependencies["pdf-lib"] or $.items[2].price) and the before and after values.
- Copy the report as text to paste into a review or ticket. Swap sides to reverse the direction.
Features
- Structural comparison: key order, indentation and whitespace don't count as differences
- Nested objects and arrays are compared recursively with JSONPath-style paths
- Type changes (a string becoming a number, an array becoming an object) are reported as changed
- Colour-coded added, removed and changed rows with counts
- Copyable plain-text report
How objects and arrays are compared
Objects are compared by key: a key that exists only on the right is added, one that exists only on the left is removed, and a key present on both sides with different values is changed, recursing into nested objects. Arrays are compared position by position, which is the behaviour most people expect for lists such as line items or configuration steps.
That positional rule means inserting an element at the start of an array reports every later element as changed, not one element as added. If arrays represent unordered sets, sort them before comparing, or use the JSON Formatter with key sorting on both sides to canonicalise objects first.
Typical uses
Reviewing an API response before and after a change, checking what a deploy altered in a configuration file, comparing package.json files across branches, or confirming that a migration preserved a record.