Compare two JSON documents
Compare two JSON documents by value and list every added, removed and changed field with its path. Key order and spacing are ignored, and nothing is uploaded.
JSON diff in three steps
Compare two JSON documents by what they hold rather than how they are written. Paste an API response from yesterday and one from today, two versions of a configuration file, or a fixture before and after a test, and the result lists each field that was added, removed or changed, with the path that leads to it.
A line-by-line diff gets JSON wrong in two directions. Reformatting a file or sorting its keys makes every line look different, so the one real change is buried. And a value that changed type, a price of 10 that became “10”, can look identical to the eye and still break the code that reads it. This comparison parses both sides first, matches object keys by name whatever their order, matches array items by position, and treats a change of type as a change.
Each line of the report starts with a sign. A plus is a field that only the changed document has, a minus is one only the original has, and a tilde is a field present in both with a different value, shown as the old value, an arrow and the new one. Paths are written the way you would reach the value in JavaScript, such as $.items[2].price, with quotes around keys that contain spaces or symbols.
Both documents have to be valid JSON. If one is not, the tool says which side and where the parser stopped, so you can fix it in the formatter before comparing. Very long values are shortened in the report to keep each line readable; the comparison itself always uses the full value.
The comparison runs in this browser tab. API responses and configuration files often hold tokens, customer records and internal addresses, and none of it leaves your device.
- 1
Paste the original JSON on the left
- 2
Paste the changed JSON on the right
- 3
Compare and read each change by its path
Frequently asked questions
Does key order count as a change?
No. Object keys are matched by name, so two documents with the same keys in a different order are the same. Array items are matched by position, because order in an array usually means something.
Is "10" the same as 10?
No. A number that became a string is listed as a change, since the program reading the JSON sees two different things even when they print alike.
How large can the documents be?
Up to 2 MB on each side. The report lists the first 5,000 changes and says when there were more.
Is my JSON uploaded?
No. Both documents are read and compared in this browser tab. Nothing is sent to FileGizmo or to anyone else.