How do I compare two JSON objects online?
Paste the original JSON on the left and the modified JSON on the right, then click Compare. The tool shows structural differences — added keys, removed keys, and changed values — in a tree view with color coding. Expand or collapse nodes to focus on specific changes. Everything runs in your browser.
Left: {"name":"Alice","age":28}
Right: {"name":"Alice","age":29}~ age: 28 → 29 1 change found
JSON Diff
Compare two JSON objects and see structural differences — added, removed, and changed keys highlighted.
About JSON Diff
This tool performs a deep structural comparison of two JSON documents. Unlike a plain text diff, it understands JSON semantics — comparing objects by key and arrays by index, so reordering whitespace or formatting won't produce false differences.
Added keys exist only in the right document. Removed keys exist only in the left. Changed keys exist in both but have different values. Nested objects and arrays are traversed recursively, showing the full JSON path to each difference.
Use Tree view to inspect each difference interactively, or Raw view for a compact, copy-friendly summary. Press Ctrl+Enter to compare.
Tips & Best Practices
Sort object keys before diffing for meaningful comparisons
JSON object key order is not guaranteed by the spec. Two semantically identical objects with different key ordering will show as completely different in a naive diff. Sort keys alphabetically before comparing to focus on actual value changes rather than ordering noise.
Array diffs are order-sensitive by default
Moving an item from index 0 to index 5 in a JSON array appears as a deletion and an addition, not a move. If your arrays represent unordered sets (e.g., tags, roles), sort them first. For ordered sequences (timeline events), the positional diff is correct.
Compare API responses across environments
Diff the JSON response from staging vs production for the same endpoint to catch environment-specific bugs: missing fields, different default values, or schema version mismatches. This is faster than manually reading two large response bodies.
Diff config files before deploying to catch unintended changes
Before deploying updated Kubernetes manifests, Terraform state, or application config, diff the old vs new JSON/YAML. This review step catches accidental permission escalations, removed security headers, or disabled authentication flags that might slip through in large config files.
Frequently Asked Questions
How does JSON diff differ from a regular text diff?
How does the tool handle array comparisons?
Can I compare minified JSON with formatted JSON?
Related Inspect Tools
Word & Character Counter
Count words, characters, sentences, and estimate reading time
Chmod Calculator
Calculate Unix file permissions with an interactive permission matrix
JSON Path Tester
Test JSONPath expressions against JSON data with real-time evaluation
Color Contrast Checker
Check WCAG 2.1 color contrast ratios for AA and AAA accessibility compliance