WebToolsPlanet
Developer Tools

JSON Diff

Paste two JSON objects or arrays and see exactly what changed between them. Both inputs are normalised to consistent formatting before diffing, so pure whitespace differences are ignored and only real value changes are highlighted.

Last updated: May 28, 2026

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What is JSON Diff?

JSON Diff compares two JSON documents and highlights the differences line by line. It first parses and pretty-prints both inputs with consistent two-space indentation, so the comparison focuses on actual data differences rather than formatting noise.

This is useful when debugging API response changes, comparing configuration file versions, reviewing data migration outputs, or verifying that a transformation preserved all expected fields.

How to Use JSON Diff

1

Paste the original JSON into the left panel

2

Paste the modified or new JSON into the right panel

3

Click "Compare JSON" to see the diff

4

Green lines are additions, red lines are removals, grey lines are unchanged

Common Use Cases

  • API developers comparing response payloads before and after a backend change to spot unexpected field changes.
  • DevOps engineers diffing Kubernetes manifest JSON exports between deployment versions.
  • QA testers verifying that a data transformation or migration produced the expected JSON output.
  • Frontend developers comparing Redux state snapshots to debug unexpected state mutations.
  • Backend engineers checking that a refactored serialiser produces identical JSON to the original.

Example Input and Output

Spotting a changed field value and a new field added between two API response versions.

Original JSON
{"id":1,"status":"active","role":"user"}
Diff output
Changed: "status": "active" → "inactive"
Added: "lastLogin": "2026-05-28"

Key ordering

If two JSON objects have the same data but keys in a different order, the diff may show false differences. Sort keys in both inputs first using the JSON Formatter tool if you need order-insensitive comparison.

Browser-side only

All diffing runs locally in your browser. Your JSON is never transmitted.

Frequently Asked Questions

Does the diff ignore whitespace differences?
Yes. Both inputs are parsed and re-serialised with consistent two-space indentation before comparison, so differences caused only by formatting or key ordering in flat objects are eliminated.
What if my JSON is invalid?
The tool validates both inputs before diffing. If either panel contains invalid JSON, an error message identifies which panel has the problem and describes the parse error.
Does this preserve key order?
JSON object key order is not guaranteed by the spec. The tool uses JSON.parse and JSON.stringify which follow insertion order in modern engines, but objects with the same keys in different order may show spurious differences.
Can I compare large JSON files?
Yes, within browser memory limits. For very large files (several MB), consider using a CLI tool like jq for comparison instead.
Is my JSON sent to a server?
No. Comparison runs entirely in your browser.