JSON Diff Tool
Compare two JSON objects online and highlight the differences. Spot added keys, removed fields, and changed values instantly — paste two JSON blocks and see a clear visual diff in your browser.
Why Use a JSON Diff Tool
Comparing JSON responses by eye is error-prone — nested structures, escaped strings, and similar-looking values make subtle differences invisible. A JSON diff tool formats and compares both objects, highlighting exactly what changed: added keys in green, removed keys in red, and modified values clearly marked. Essential for debugging API response changes between versions, comparing config files, validating test fixture updates, or reviewing what a migration script changed in your data.
- Visual diff: Added lines in green, removed lines in red — just like a code diff
- JSON-aware comparison: Formats both inputs before diffing — ignores meaningless whitespace differences
- Deep object diff: Highlights changes at any nesting level, not just top-level keys
- Instant results: Diff updates in real time as you paste or edit either input
- 100% private: Your JSON never leaves the browser — safe for API responses with sensitive data
Choose the Right Variant
- This page: JSON-specific diff — compare two JSON objects with structure-aware output
- Diff Checker: General-purpose text diff for any content
- Compare Text Online: Side-by-side text comparison
- String Compare: Compare two strings and find differences
Step-by-Step Tutorial
- Paste your original JSON into the left panel — e.g. the previous API response or config
- Paste the new or modified JSON into the right panel
- The diff highlights added lines (green), removed lines (red), and unchanged lines (plain)
- Scroll through the diff to find all changes — nested keys show full path context
- For large JSON, use your browser's Ctrl+F to search within the diff output
Common JSON Diff Use Cases
- API version comparison: Diff v1 and v2 API responses to find breaking changes
- Config file review: Compare
appsettings.jsonbetween environments before deploy - Test fixture updates: Verify that expected output JSON changed only where intended
- Database migration validation: Compare before/after snapshots of JSON document fields
- Feature flag configs: Review changes to JSON feature flag definitions before rollout
- Translation files: Find missing or changed keys in i18n JSON locale files
Privacy and Data Handling
All diff computation runs in your browser — neither JSON block is sent to any server. Safe to use with API responses containing user data, tokens, or internal configuration values. Data is not retained after you close the tab.
Frequently Asked Questions
Does the JSON diff handle different key ordering?
The text-based diff compares the formatted (pretty-printed) output of both JSON objects. Since JSON objects are unordered by spec, key ordering may differ between two semantically identical objects and still show as differences in a line-by-line text diff. To compare purely on structure and values regardless of key order, format both JSON objects using the same JSON formatter first (which sorts keys alphabetically), then paste the formatted output into the diff tool. This normalizes ordering and makes the diff show only genuine value changes.
How do I compare JSON arrays where items are reordered?
Array element order is significant in JSON — [1, 2, 3] and [3, 1, 2] are different values. If you're comparing arrays where the order changed but the content is the same, a text diff will show many false positives. Sort the arrays before diffing: use a JSON formatter that allows array sorting, or run JSON.stringify(arr.sort()) in your browser console for simple value arrays. For arrays of objects, sort by a stable key (like id) in both datasets before diffing.
What should I do if my JSON is invalid and won't diff correctly?
Paste each JSON block into a JSON formatter first to validate and fix it — the formatter highlights syntax errors with line numbers. Common issues: trailing commas (not valid in JSON), single quotes instead of double quotes, unquoted keys, or missing closing brackets. Once both blocks are valid JSON, paste the formatted output into the diff tool. The formatter also normalises indentation, which removes whitespace-only differences from the diff output and makes real changes easier to spot.