JSON Diff
Compare two JSON documents side by side with a line-level diff.
Frequently asked questions
- How does the diff work?
- Both documents are parsed and pretty-printed to identical formatting, then compared line by line. Green lines exist only on the right, red lines only on the left.
- Does key order matter?
- Only if you turn "Sort keys" off. It is on by default, so reordering keys in a config file is not reported as a change.
- Is my data sent anywhere?
- No. Parsing and comparison happen entirely in your browser.
- What if one document is huge?
- Very large documents are diffed without row alignment (approximate counts). LCS row-by-row diff is capped to keep the tab responsive.
- Do both documents need to be valid JSON?
- Yes. Both panes are parsed with JSON.parse before comparison; if either one is invalid, the tool reports a parse error instead of a diff. Use the JSON Formatter first if you need to locate the syntax error.
- Does it ignore whitespace and formatting differences?
- Yes. Both documents are parsed and reprinted with identical indentation, so indentation, line breaks and trailing spaces never appear as changes. Only actual value changes, added keys and removed keys are highlighted.
About this tool
JSON Diff compares two JSON documents after parsing and pretty-printing them to the same layout, then highlights added and removed lines. It is useful for reviewing configuration changes, API response differences, migrations and refactors without scanning both files by hand. Everything runs in your browser, so sensitive payloads stay on your device.
How to use it
- Paste the original JSON into the left pane and the updated JSON into the right pane.
- Leave Sort keys on for order-insensitive comparison, or turn it off to see key reordering.
- Read the result: red lines exist only on the left, green lines only on the right.
- Adjust either document and the diff updates automatically.
← All tools