JSON Compare
Compare two JSON objects for deep equality or find differences. Checks structural equality ignoring key order. All processing happens locally in your browser.
How to Use JSON Compare
Paste Both JSONs
Paste the first JSON in the left panel and the second JSON in the right panel. Both must be valid JSON.
Choose Comparison Mode
Click "Deep Compare" to check if the two JSON objects are structurally equal (ignoring key order). Click "Show Diff" to see the key-by-key differences.
Review Results
For Compare mode: a green success message if they match, or the first difference found. For Diff mode: a structured breakdown of keys only in left, only in right, and values that differ.
Examples
JSON A
{"name":"DevTools","version":"1.0","settings":{"theme":"dark"}} JSON B
{"version":"1.0","name":"DevTools","settings":{"theme":"light"}} Diff Result
✗ settings.theme:
A: "dark"
B: "light" Frequently Asked Questions
What's the difference between Compare and Diff?
Compare (deep equality) tells you whether two JSON objects are semantically identical — same keys, same values, same structure — regardless of key order. Diff goes further and lists every key that appears in only one object or has a different value between the two. Use Compare for a quick yes/no, use Diff to understand exactly what changed.
Does key order affect the comparison?
No. The deep compare ignores key ordering — {"a":1,"b":2} and {"b":2,"a":1} are considered equal. This matches how JSON is defined in the spec, where objects are unordered collections.
How are arrays compared?
Arrays are compared element-by-element in order. [1, 2, 3] is different from [3, 2, 1]. Nested arrays and objects are compared recursively. If you need to compare arrays regardless of element order, sort them first using the JSON Sort tool.
Useful for API Testing and Config Management
Comparing JSON is a daily task if you work with APIs. You deploy a change and need to verify the API response hasn't changed unexpectedly; you migrate from one service to another and need to confirm the output is equivalent; you update a config file and want to see exactly what keys you touched.
The deep compare is useful for automated testing scenarios — for example, checking that your staging API returns the same data structure as production, even if key ordering differs between environments.
Diff mode helps with code review: when someone updates a JSON config file, paste the old and new versions here to see exactly which keys were added, removed, or changed — without scanning through lines manually.