JSON Compare (JSON Diff)
Paste two JSON documents to see exactly which values were added, removed or changed.
Runs in your browser · nothing is uploaded
How to use the JSON Compare
- Paste the original JSON on the left and the changed JSON on the right, or open a file on each side.
- The comparison runs as you type. Each difference is listed with its path, such as $.user.address.city, and the old and new values.
- Use the filters to show only added, removed or changed values.
- If either side is not valid JSON, the error tells you which side and which line to fix.
About this tool
A plain text diff of two JSON files is noisy: re-ordered keys and different indentation show up as changes even when the data is the same. This tool compares the parsed data instead, so it reports only real differences. Keys can be in any order and spacing does not matter.
Each change is shown with a path in the familiar $.key[index] notation, the same style used by JSONPath and many test frameworks, so you can jump straight to the field in your code. Arrays are compared position by position, which is how most APIs treat them: if an item is inserted at the start of a list, every later position is reported as changed.
Typical uses are checking what an API returns after a deploy, reviewing changes to a config file, and finding why a snapshot test fails.
Frequently asked questions
›Does key order matter?
No. {"a":1,"b":2} and {"b":2,"a":1} are reported as identical, because JSON objects have no order.
›How are arrays compared?
Item by item at the same position. Extra items at the end are listed as added or removed. To compare arrays of objects regardless of order, sort them the same way first.
›Is 1 the same as "1"?
No. A number and a string are different types in JSON, so the tool reports it as a change. That catches a common API bug.
›Is my data sent anywhere?
No. The tool runs entirely in your browser with JavaScript. What you paste is never uploaded, logged or stored on our servers, so it is safe to use with internal data, though you should still treat secrets with care on shared computers.
›Can I compare plain text instead?
Yes, use the text compare tool, which shows a line-by-line diff of any two texts.