Skip to content

JSON Diff - Compare JSON Documents Online

JSON A (Original)
JSON B (Modified)

About JSON Diff

Tracking down what changed between two JSON documents is a common chore. Maybe you are comparing a staging API response against production, reviewing a config file before and after a deploy, or checking that a migration script transformed data correctly. Plain text diffs are noisy because whitespace and key order create false positives. This tool parses both documents and compares them structurally, so only real data differences show up.

Every difference is reported with a full path, the old value, the new value, and a colour-coded badge so you can scan results quickly even on large documents.

How to Use It

Paste the original JSON into the left editor and the modified JSON into the right editor. The diff results panel below updates automatically. Each row shows a coloured status badge (green for additions, red for removals, yellow for changes), the affected path, and the old and new values. If both documents are structurally identical, you will see a confirmation message instead.

Features

  • Structural comparison. Whitespace and key ordering differences are ignored -- only actual data changes are reported.
  • Deep recursion. Nested objects and arrays are compared at every level, not just the top-level keys.
  • Colour-coded results. Additions, removals, and changes each get a distinct badge colour for fast visual scanning.
  • Full path context. Each diff row includes the JSONPath so you know exactly where the change lives.
  • Client-side only. Both documents stay in your browser. No data is uploaded anywhere.

Common Use Cases

DevOps teams compare environment-specific config files to spot unintentional overrides. API developers diff response payloads across versions to document breaking changes. QA engineers validate that data transformation scripts produce the expected output by diffing the before and after snapshots. It is also useful for reviewing database seed files or localisation JSON when keys are added or values are updated.

Frequently Asked Questions

What kind of differences does this tool detect?
It detects three types of differences: additions (keys present in the second JSON but not the first), removals (keys present in the first JSON but not the second), and changes (same key exists in both but the value is different). Each difference includes the full path to the affected field.
Does it handle nested objects and arrays?
Yes. The comparison walks both documents recursively. Nested objects are compared key-by-key and arrays are compared element-by-element, so differences at any depth are reported.
What path format is used in the results?
Paths use JSONPath dot notation starting from `$`. Object keys appear after a dot (e.g. `$.user.name`) and array elements use bracket notation (e.g. `$.items[0]`).
What happens if one of my inputs is not valid JSON?
The tool shows a clear error message indicating which side has the syntax problem. Fix the issue and the diff will re-run automatically.
Is my data sent to a server?
No. Both documents are parsed and compared entirely in your browser. Nothing is transmitted over the network.