About the JSON Compare
Paste two JSON documents, such as staging and production API responses or an old and new config, and get a list of every difference with its path, like items[0].qty or customer.tier. Key order and whitespace are ignored, but array order matters. It also flags type changes such as 49.9 becoming "49.90", which a visual diff can miss. Results update as you type.
How to use the JSON Compare
- Paste the original into JSON 1 and the changed version into JSON 2.
- Wait for the toolbar badge to change from Auto-comparing to Identical or Different.
- Read Comparison Result: one line per difference, each starting with its path.
- If a Parse Error appears, fix that side first; the JSON formatter points to the broken character and tolerates trailing commas.
- Click Clear All to compare another pair.
Worked example: an order before and after a refund
JSON 2 has its keys in a different order and adds a refund. The key order and the unchanged coupon: null produce no lines. Everything else is reported in the order the keys appear in JSON 1, followed by keys that exist only in JSON 2.
{
"id": "ord_1042",
"status": "paid",
"total": 49.9,
"customer": { "email": "ana@example.com", "tier": "gold" },
"items": [ { "sku": "MUG-01", "qty": 2 }, { "sku": "TEE-04", "qty": 1 } ],
"coupon": null
}{
"status": "refunded",
"id": "ord_1042",
"total": "49.90",
"customer": { "email": "ana@example.com" },
"items": [ { "sku": "MUG-01", "qty": 3 } ],
"coupon": null,
"refund_id": "rf_88"
}status: "paid" !== "refunded"
total: Type mismatch (number vs string)
customer.tier: Missing in second JSON
items: Array length differs (2 vs 1)
items[0].qty: "2" !== "3"
items[1]: Missing in second JSON
refund_id: Missing in first JSONReading the result lines
Two things never show up as differences: key order, and number formatting, because 1.50 and 1.5 or 1e3 and 1000 parse to the same value. Arrays are compared position by position, so {"id":1},{"id":2}] against the same items in reverse order reports [0].id: "1" !== "2" and [1].id: "2" !== "1". If order does not matter for your data, sort both arrays the same way before comparing. Deeply nested payloads are easier to scan if you run both sides through the [JSON flattener first.
| Line | Meaning | Typical cause |
|---|---|---|
| path: "a" !== "b" | Same key, same type, different value | A real data change, or a timestamp or ID that differs on every request |
| path: Type mismatch (number vs string) | Same key, different JSON type | A serializer change, such as decimals sent as strings or IDs switching to strings |
| path: Missing in second JSON | Key or array item exists only in JSON 1 | Removed field, or a field that is omitted when empty |
| path: Missing in first JSON | Key or array item exists only in JSON 2 | New field added by the newer version |
| path: Array length differs (2 vs 1) | Arrays have different sizes | Usually followed by Missing lines for the extra items |
See API and config drift instantly
Staging and production responses should match-until they do not. Pasting two JSON bodies into a diff view surfaces added keys, reordered arrays, and numeric changes faster than eyeballing pretty-printed logs.
Use this alongside the JSON formatter: normalize both sides first if whitespace noise hides the real semantic diff.
Privacy for sensitive payloads
Because comparison runs in the browser, tokens and PII never need to hit a backend diff service-still avoid pasting production secrets on shared machines.
JSON Compare: frequently asked questions
- What is the difference between JSON diff and text diff?
- Text diff compares raw characters line by line. JSON diff understands the structure — it compares keys and values semantically, so reordered keys in the same object show as no change, and nested differences are clearly highlighted by path.
- Can I compare large JSON files?
- Yes. The comparison runs entirely in your browser using JavaScript, so large files are processed locally without uploading. Performance depends on your device, but most JSON files up to a few megabytes compare instantly.
- Does key order matter when comparing JSON?
- For JSON objects, key order does not matter — {a:1, b:2} and {b:2, a:1} are semantically equal. For JSON arrays, order does matter — [1, 2] and [2, 1] are different.
- Is my JSON data sent to a server?
- No. All comparison runs locally in your browser. Your JSON data is never uploaded or stored anywhere.