JSON Diff
Compare two JSON objects and highlight added, removed, and changed keys.
About this tool
JSON Diff is a tool that compares two JSON objects side-by-side and displays exactly which keys were added, removed, or modified. When working with configuration files, API responses, or version-controlled data, understanding what changed between two versions is essential for debugging, auditing, and validation. This tool makes that comparison instant and visual, highlighting differences in a clear format.
To use JSON Diff, paste or import your two JSON objects into the left and right panels, and the tool immediately shows a breakdown of all differences: new keys appear with a green indicator, deleted keys with red, and modified values with yellow. You can expand or collapse each difference to see the full context. Common use cases include comparing API request/response pairs, validating config file changes, reviewing JSON data exports before and after processing, and tracking schema changes across application versions.
Because JSON Diff works entirely in your browser, your data never leaves your device—making it safe for sensitive or proprietary configurations. The tool handles deeply nested objects, arrays, and mixed data types, though very large files may require patience. It's invaluable for developers, DevOps engineers, and anyone managing JSON-based workflows who needs a quick, reliable way to spot changes without manual line-by-line inspection.
Frequently Asked Questions
Code Implementation
# pip install deepdiff
from deepdiff import DeepDiff
import json
a = {"name": "Alice", "age": 30, "address": {"city": "Paris", "zip": "75001"}}
b = {"name": "Alice", "age": 31, "address": {"city": "Lyon", "zip": "75001"}, "email": "alice@example.com"}
diff = DeepDiff(a, b, verbose_level=2)
print(diff)
# {
# 'values_changed': {
# "root['age']": {'new_value': 31, 'old_value': 30},
# "root['address']['city']": {'new_value': 'Lyon', 'old_value': 'Paris'}
# },
# 'dictionary_item_added': ["root['email']"]
# }
# Ignore array order (useful when arrays are used as sets)
a2 = {"tags": ["python", "json", "tools"]}
b2 = {"tags": ["tools", "json", "python"]}
diff2 = DeepDiff(a2, b2, ignore_order=True)
print(diff2) # {} — no differences when order is ignored
# Pretty-print all changes
for change_type, changes in diff.items():
print(f"\n{change_type}:")
if isinstance(changes, dict):
for path, detail in changes.items():
print(f" {path}: {detail}")
else:
for path in changes:
print(f" {path}")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.