How to Compare JSON Documents
JSON Diff
Structural vs Line Diff
This tool first parses both JSON documents, summarizes structural changes (top-level keys and array element values), then shows a pretty-printed unified line diff for full visibility. Paste original JSON in the first panel and modified JSON in the second.
Common Use Cases
- Comparing API responses before and after a change
- Reviewing config file edits
- Debugging test fixture differences
Common Mistakes
- Comparing minified vs formatted JSON and seeing whitespace-only diffs in the line view
- Expecting array order changes to appear as structural changes when values are identical
- Pasting invalid JSON in one panel — fix parse errors before diffing
Developer Tips
- Sort keys on both documents first for cleaner line diffs
- Use JSON Patch tool to generate machine-readable change operations
- Focus on the structural summary for quick API regression review
Frequently asked questions
Does key order matter?
JSON is parsed before diffing, so key order in the input does not affect structural comparison. The line diff uses pretty-printed output.
What if one side has invalid JSON?
The tool reports a parse error for the invalid panel before running the diff.