🔗 JSON Diff
Compare two JSON values semantically. Key-order independent. Get a list of added, removed, and changed paths.
Last updated: May 21, 2026 · By Λ
Compare JSON without false positives
A line-based diff treats two JSON objects as different the moment a key moves position or whitespace shifts. That is rarely what you want. This tool walks the parsed tree on both sides and reports the actual structural differences: keys that were added, keys that were removed, and values that changed. The result is the kind of diff you can paste into a code review or use to drive a config migration script.
Common uses include comparing two API responses captured before and after a deploy, reviewing config drift between environments, validating that a serializer round-trip preserves data, and inspecting what changed in a webhook payload between retries. The parser tolerates trailing commas in error messages but not in the JSON itself, since the spec forbids them. Arrays are compared positionally, so reordering an array counts as a change.
How to use this tool
- Paste the original JSON into the Left panel and the new version into the Right panel.
- The diff updates as you type. Parse errors show under each panel.
- Toggle "Sort object keys" to ignore key-order differences (recommended).
- Toggle "Strict type compare" off if you want the number 1 to equal the string "1".
- Use "Copy Diff" to paste the result into a code review or commit message.
Frequently Asked Questions
How are arrays compared?
Arrays are compared positionally. The element at index 0 of the left side is compared to the element at index 0 of the right side. If you reorder an array, every shifted element shows up as a change. To compare by content, sort both arrays first.
Does the tool handle large JSON?
Yes, up to about 10 MB per side. Beyond that, browser memory becomes the bottleneck. The diff algorithm is linear in the total number of keys.
What is the difference between strict and loose type compare?
Strict mode treats numbers, strings, and booleans as distinct types. The number 1 differs from the string "1" and from the boolean true. Loose mode uses JavaScript's == operator, so 1, "1", and true are all considered equal to each other.
Is my data sent anywhere?
No. The diff runs entirely in your browser. Check your DevTools Network tab and you will not see your JSON in any outbound request.