Does JSON compare treat key order as a difference?
No. Objects are compared by key name. `{"a":1,"b":2}` and `{"b":2,"a":1}` are equal.
Paste a left-hand document and a right-hand document to compare JSON as trees. The report groups additions, removals, and value changes by path — not by line — so reformatting the file does not fake a diff.
JSON formatter
Run a tool to see a polished result here
A line-based diff lights up whenever keys move or pretty-print width changes. JSON compare parses both sides, walks objects by key, and only reports structural drift: a new field, a deleted field, or a value that actually changed. Array positions still matter; object key order does not.
Need the compact path list for a pull-request comment? Open JSON diff — same local engine, different report layout.
Inspect one document as a foldable tree first with the Tree view if you are not sure which nested field drifted.
If either side fails to parse, run the Validate JSON (or Repair) before comparing; this page expects two valid JSON values.
Equal numbers, booleans, strings, and nulls are ignored. Reordering object keys is ignored. Pretty-print whitespace is ignored. Moving from 1 to "1" is a change because JSON types differ. Inserting a key that the left side never had is an addition. Dropping a key is a removal. Arrays are compared by index: swapping two items looks like two value changes, not a move.
{ "id": 1 } vs { "id": "1" } → changed $.id
{ "b": 1, "a": 2 } vs { "a": 2, "b": 1 } → equal
{ "tags": ["a", "b"] } vs { "tags": ["b", "a"] } → two array-index changesOps and backend reviews often paste a production body next to a staging body. Because both documents stay in this tab, tokens inside the payload are not posted to jfmt.dev. Compare the decoded JSON, not the HTTP envelope, if headers or transfer encoding would otherwise create noise.
JSON Diff on this site prints a compact unix-style list (+ / - / ~) that pastes cleanly into a ticket. JSON compare wraps the same engine in a grouped report aimed at people searching for “json compare”. If you already know you want a line-oriented path list, use Diff; if you want a readable before/after summary, stay here.
The left editor starts with a paid order. The compare field starts with the same order after a refund plus a second line item. Run the tool to see status change, a new customer.email, and items[1] appear as grouped differences.
{
"orderId": "A-1001",
"status": "paid",
"customer": { "name": "Ada", "plan": "pro" },
"items": [
{ "sku": "fmt", "qty": 1, "price": 9 }
]
}Use JSON compare when the search intent is “compare two JSON files” — staging vs production configs, two versions of an order payload, or a snapshot test that failed. It is the wrong page if you only need to pretty-print one document or convert it to Excel.
No. Objects are compared by key name. `{"a":1,"b":2}` and `{"b":2,"a":1}` are equal.
No. Arrays keep index identity. `["a","b"]` vs `["b","a"]` reports two changed indexes, not a reorder.
Both walk the same tree. Diff emits a flat + / - / ~ list. Compare groups those lines into Added / Removed / Changed and uses copy aimed at “json compare” searches.
No. A number and a string are different JSON types, so the path is reported as changed.
No. Parsing and comparison run in a Web Worker in this tab.