What is JSON Diff?
JSON Diff compares two JSON objects and highlights all differences including added, removed, and modified fields. It performs deep comparison and shows the exact path to each difference.
Unlike simple text diff tools, JSON Diff understands JSON structure. It compares objects semantically, detecting changes in nested properties, arrays, and values regardless of whitespace or key order differences.
How to Compare JSON Files
- Paste first JSON: Add original JSON to the left panel
- Paste second JSON: Add comparison JSON to the right panel
- Click Compare: Tool analyzes both structures deeply
- Review differences: See added (green), removed (red), and changed (blue) fields
- Check paths: Each difference shows the exact location (e.g., user.profile.email)
Why Use JSON Diff?
Compare API Versions
When upgrading APIs, compare v1 vs v2 responses to document breaking changes. See exactly what fields were added, removed, or changed so you can update client code accordingly.
Debug Configuration Changes
Compare production vs staging configs to find differences causing bugs. Quickly spot mismatched database URLs, feature flags, or environment variables between deployments.
Review Data Updates
Compare "before" and "after" snapshots of database records to see what changed. Useful for audit trails, debugging data corruption, or understanding third-party API updates.
Validate Data Migrations
After migrating data between systems, compare source and destination JSON to ensure nothing was lost or transformed incorrectly during the migration process.
Key Features
- Deep comparison: Recursively compares nested objects and arrays
- Change detection: Identifies added (+), removed (-), and changed (~) values
- Path display: Shows exact location using dot notation (parent.child.property)
- Type changes: Detects when value types change (string → number)
- Array comparison: Compares array contents and order
- Color coding: Visual highlighting for each change type
- No differences: Clear message when JSONs are identical
- Client-side only: Both files stay in your browser
JSON Diff vs Text Diff
Text diff tools (like Unix diff): Compare files line-by-line as plain text. They don't understand JSON structure, so reformatting causes false positives.
JSON Diff (our tool): Parses JSON structure and compares semantically. Whitespace changes are ignored. Key order doesn't matter. Only actual data changes are reported.
Example: If you reformat JSON or reorder object keys, text diff shows everything as changed. JSON Diff correctly shows no differences because the data is identical.
Understanding Diff Output
- + Added: Field exists in second JSON but not in first (green)
- - Removed: Field exists in first JSON but not in second (red)
- ~ Changed: Field exists in both but has different values (blue)
- ~ Type changed: Same field, different data type (string vs number)
- Array changed: Array contents or order differ
- Path format: Nested paths shown as parent.child.grandchild
Related Tools
After comparing JSON files, you might need: