JSON Diff – Compare JSON Objects
Compare two JSON objects and see added, removed and changed fields highlighted in a color-coded table.
Frequently Asked Questions
What does the JSON Diff tool do?
It compares two JSON objects key by key and highlights added, removed, and changed fields in a colour-coded table.
Does it support deeply nested objects?
The current version compares the top-level keys. Nested values that differ are shown as 'changed' with their full serialised values.
Can I compare JSON arrays?
The tool is optimised for JSON objects. Arrays are compared as serialised values; for array-specific diffing, use the Text Diff tool.
Is my JSON sent to a server?
No. All comparison happens in your browser — nothing leaves your device.
Why Compare JSON Objects?
JSON is the universal data format for APIs, configuration files, and NoSQL documents. Understanding what changed between two versions of a JSON object is essential for:
- Debugging API responses — spotting unexpected field additions or type changes between environments.
- Reviewing configuration drift — comparing a deployed config against the expected template.
- Auditing data migrations — verifying that a transformation preserved all required fields.
- Testing — asserting that an API response matches a stored fixture.
Types of JSON Differences
| Change type | Description | Example |
|---|---|---|
| Added | Key exists in B but not in A | "newField": true added |
| Removed | Key exists in A but not in B | "oldField": 42 removed |
| Changed | Key exists in both but values differ | "status": "active" → "inactive" |
| Type change | Same key, different value type | "count": 5 → "5" (number → string) |
Using JSON Diff in CI/CD
JSON diff is a common step in automated testing pipelines. Tools likejest'stoMatchObject, Python's deepdiff, and CLI tools like jqand json-diff(npm) perform similar comparisons programmatically. This online tool is ideal for quick manual inspection without writing code.