Free online JSON compare — diff two JSON documents

Paste two JSON values; we normalize and show whether they differ—auto as you type.

⚡ Auto-comparing
JSON 1
JSON 2

Features

⚡ Auto-Comparison✓ Deep Comparison✓ Nested Objects✓ Arrays✓ Type Checking✓ Path Tracking

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

  1. Paste the original into JSON 1 and the changed version into JSON 2.
  2. Wait for the toolbar badge to change from Auto-comparing to Identical or Different.
  3. Read Comparison Result: one line per difference, each starting with its path.
  4. If a Parse Error appears, fix that side first; the JSON formatter points to the broken character and tolerates trailing commas.
  5. 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.

JSON 1
{
  "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
}
JSON 2
{
  "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"
}
Comparison Result
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 JSON

Reading 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.

LineMeaningTypical cause
path: "a" !== "b"Same key, same type, different valueA real data change, or a timestamp or ID that differs on every request
path: Type mismatch (number vs string)Same key, different JSON typeA serializer change, such as decimals sent as strings or IDs switching to strings
path: Missing in second JSONKey or array item exists only in JSON 1Removed field, or a field that is omitted when empty
path: Missing in first JSONKey or array item exists only in JSON 2New field added by the newer version
path: Array length differs (2 vs 1)Arrays have different sizesUsually 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.