Skip to main content
{{{{}}}}[[[[]]]]::::,,,,
HomeToolsJSON Compare Online
JSON DIFF TOOL

JSON Compare Online

🔍 Compare two JSON objects instantly — deep recursive diff with added, removed, changed and type-changed highlighting at every level.

✅ 100% Free🔓 No Login Required🔒 Runs in Browser⚡ Deep Nested Diff
Added Keys
Removed Keys
Changed Values
Type Changes

JSON A (Original)

352 chars

JSON B (Modified)

398 chars

What Is JSON Comparison?

JSON comparison — also called JSON diff — is the process of taking two JSON objects and identifying exactly what changed between them. Unlike plain text diffing, which compares lines, JSON diffing understands the structure of the data. It knows that { "a": 1, "b": 2 } and { "b": 2, "a": 1 } are identical, even though the key order is different.

This matters enormously in real development. API responses change between versions. Database records change after migrations. Config files diverge between environments. When something breaks, you need to know exactly what changed — not just that the JSON is different.

Common Use Cases

🔌

API Response Debugging

Compare the expected API response with the actual one to find missing fields, type mismatches or changed values.

🗄️

Database Migration Validation

After migrating data, compare a sample record before and after to verify every field migrated correctly.

⚙️

Config File Diffing

Compare config.json between environments — development, staging and production — to find unexpected differences.

📋

Version Comparison

Compare API versions to build a changelog. See exactly which fields were added, removed or changed between v1 and v2.

🧪

Test Assertion Review

Compare expected vs actual test output in detail when a JSON assertion fails.

🔄

Data Synchronization

Compare two data sources that should be in sync and identify which records differ and how.

Understanding the Diff Results

The comparison result has four change types. Added (green) means the key exists in JSON B but not in JSON A — it was newly introduced. Removed (red) means the key existed in JSON A but is missing in JSON B — it was deleted. Changed (yellow) means the key exists in both but the value is different. Type Changed (orange) is a specific and important category — the key exists in both and even the value looks similar, but the data type is different — for example a number became a string.

Type changes are particularly valuable to detect because they often indicate bugs that are invisible to the human eye. The number 42 and the string "42" look identical when logged but behave completely differently in code — one passes a numeric validation, one does not.

🔧 How It Works

Deep recursive JSON comparison with visual diff — instant, private, free

1

Paste Both JSON Objects

Paste the original JSON on the left and the modified version on the right. Use the sample data to see how it works.

2

Click Compare

Hit Compare JSON and get an instant visual diff showing added, removed, changed and type-changed fields across any level of nesting.

3

Filter & Export

Filter by change type, expand or collapse nested objects, and download a full diff report as a text file.

Frequently Asked Questions

Everything about JSON comparison and diffing

Do I need to sign up or log in to use this tool?

No. All QuickTextTools are completely free to use online with no login, signup, or account required.

How does the JSON comparison work?

The tool performs a deep recursive comparison of both JSON objects. It walks every key in both objects simultaneously and classifies each field as added, removed, changed, type-changed or unchanged. Nested objects and arrays are compared recursively to any depth.

What does type-changed mean?

Type-changed means a key exists in both JSON objects but the value type is different. For example, if the left has age: 30 (a number) and the right has age: '30' (a string), the field is marked as type-changed. This is a common bug in APIs and data migrations.

Can I compare nested objects and arrays?

Yes. The comparison is fully recursive. Nested objects are expanded and compared key by key. Arrays are compared element by element. Changed arrays show which indexes were added, removed or modified.

What do the colours mean in the diff?

Green with + means the key was added in the right JSON. Red with - means the key was removed from the right JSON. Yellow with ~ means the value changed. Orange with T means the type changed. Grey means the values are identical.

Can I filter the diff results?

Yes. Use the filter buttons above the diff to show only added, removed, changed or type-changed fields. Toggle the Show Unchanged option to hide or show identical fields.

Is my JSON data sent to any server?

No. All comparison processing happens entirely in your browser using JavaScript. Your JSON data never leaves your device.

Can I download the comparison report?

Yes. Click the Download Report button to save a plain text diff report showing all changes with their paths, old values and new values.