JSON Diff
RUNS LOCALLYCompare two JSON documents by structure rather than as text. Formatting and key order are ignored entirely, so reindenting one side changes nothing and only real differences are reported. Every change is located by JSON Pointer, and a value that changed type is called out separately from one that merely changed.
Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information.
How to use the JSON Diff
- Paste the original document into the first pane and the one you are comparing into the second.
- Press Compare. Both are parsed first, so a syntax error names which side failed.
- Read the changes by path. A pointer like /items/0/name is read left to right from the root.
- Check type changes first. A number that arrived as a string is the most common cause of a downstream failure.
A worked example, and what it shows
The example compares two API responses for the same record. They are indented differently, their keys are in a different order, one price has changed, and one identifier has become a string. A text diff on this pair reports almost every line as different.
Two changes are reported and nothing else. The reformatting and the key reordering are invisible, the changed price appears as a value change, and the identifier appears as a type change, which is the one likely to break a consumer.
Press Example in the workspace above to load it.
Common questions about the JSON Diff
Why not just use a text diff?
Because reformatting one side changes every line while changing no data, and key order does the same. A text diff reports both as differences, so the one value that actually moved is buried. Comparing parsed values makes formatting and ordering invisible by construction rather than by effort.
How are arrays compared?
By index. Element zero is compared with element zero, and so on. Matching elements by similarity instead would produce a shorter report that is frequently wrong about which element moved, and a confidently wrong diff costs more time than a verbose correct one.
What does a type change mean?
That a value kept its meaning but changed its JSON type — most often a number arriving as a string, such as 1 becoming "1". It is reported separately because it is the change most likely to break a consumer while looking harmless to a human reading the response.
How do I read a path like /items/0/name?
It is a JSON Pointer, read left to right from the document root: take the items property, take the element at index zero, take its name property. Indexes are zero-based. A path shown as / refers to the root value itself.
Does my input leave the browser?
No. Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information. That distinction matters here, because a JSON document pasted into a formatter is very often a real API response containing real customer records.