Reordered keys
- Input
- {"a":1,"b":2} vs {"b":2,"a":1}
- Output
- Identical
A text diff reports both lines as changed. Key order has no meaning in JSON, so a structural comparison correctly finds nothing.
This tool compares two JSON documents by structure rather than by text. That distinction is the whole point: key order and indentation carry no meaning in JSON, so a text diff of two equivalent payloads can light up every line while a structural comparison correctly reports that nothing changed.
Runs entirely in your browser — nothing you paste is uploaded.
How to
Put the original on the left and the new version on the right. Each is validated separately, so an error in one is reported against that side.
Counts of added, removed and changed values tell you the scale of the difference before you read any of it.
Each difference is listed with a path such as $.items[2].price, so you can find it in the original document immediately.
When the documents are equivalent the tool says so plainly, regardless of how differently the two were formatted.
Examples
A text diff reports both lines as changed. Key order has no meaning in JSON, so a structural comparison correctly finds nothing.
The path points straight at the value that moved, which is what you need in a document with several hundred keys.
Arrays are compared by position, since order is meaningful in a JSON array in a way it is not for object keys.
Why use it
Reformatting, reindenting and reordering keys are all invisible, so the differences reported are differences that matter.
Every entry is addressed with a path expression, which can be pasted into a query or used to navigate the original document.
Objects within arrays within objects are walked recursively, so a difference buried six levels down is found and named.
Comparing two API responses often means comparing two sets of real customer records. Neither is uploaded.
Good to know
Summary
FAQ
Discover