JSON Structural Diff Viewer
Analyze structural changes between two JSON documents — added keys, removed keys, type changes, and modified values. All processing happens in your browser.
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.
What is a structural JSON diff?
A structural diff goes beyond line-by-line comparison to analyze the JSON tree. It categorizes changes as additions (new keys or array elements), deletions (removed keys), modifications (changed values), and type changes (e.g., string to number). Results are presented with full JSON paths, making it easy to locate each change in deeply nested structures.
Common use cases
API developers use structural diffs to detect breaking changes between schema versions — a renamed key or changed type can break consumers even if the text diff looks minor. Configuration management teams diff Terraform state files to understand infrastructure changes. Database teams compare schema export snapshots to track DDL drift over time.
Frequently Asked Questions
What counts as a structural change in JSON?
Structural changes include added or removed object keys, added or removed array elements, type changes (e.g., string to number), and changes in nesting depth. Value changes within the same type are reported as modifications rather than structural changes.
How is a structural diff different from a text diff?
A text diff compares line by line and is affected by formatting, whitespace, and key order. A structural diff parses the JSON tree and compares nodes semantically, so reformatting or reordering keys does not produce false positives.