JSON Diff

Compare two JSON objects and visualize the differences.

JSON Diff

Compare two JSON objects and find differences

No Comparison Yet

Enter two JSON objects and click compare to see differences

JSON Diff Reference

1. Paste both JSON objects

Paste the first JSON in the left panel and the second in the right. Both must be valid JSON. Use a JSON formatter first if your input has syntax errors — the tool will show you which fields differ.

2. Read the diff output

Added keys appear in green, removed keys in red, and changed values in yellow. Unchanged fields are shown in neutral color. Nested objects are compared recursively at every level.

3. Use for debugging

Compare API response before and after a change, debug data migrations, review configuration drift between environments, or audit what changed between two versions of a data model.

Common JSON Diff Use Cases

API response debugging
Paste the response from two API versions or environments side-by-side to spot schema changes, missing fields, or unexpected value differences without manually scanning the JSON.
Configuration management
Compare prod vs staging config files to identify environment-specific values that were accidentally overwritten or fields that were added to one environment but not the other.
Data migration validation
After transforming or migrating data, diff a sample record from the source against the target to verify the migration logic preserved all fields correctly.
Code review assistance
When reviewing a PR that modifies JSON schemas or fixtures, paste the before and after JSON to get a clear picture of what changed rather than reading raw text diffs.

How Deep JSON Comparison Works

Shallow comparison checks only top-level keys. Deep (recursive) comparison walks every nested object and array to find differences at any depth. For arrays, the diff checks both the elements and their order — reordering array items counts as a change. For objects, key order does not matter: {"a":1,"b":2} and {"b":2,"a":1} are considered equal. All comparison in this tool runs entirely in your browser — no JSON data is sent to any server, making it safe to use with sensitive API tokens, user data, or internal configuration files.

Frequently Asked Questions

Common questions about JSON Diff