Free JSON Diff Tool
Compare two JSON documents and see exactly what changed. Added, removed and changed values are listed by path, while key order and spacing are ignored, free, with nothing uploaded anywhere.
Key order and whitespace are ignored. Arrays are compared position by position. Nothing leaves your device.
What this tool does
This tool compares two JSON documents and lists every difference between their parsed values. Instead of reading two blocks of text and hunting for changes, you get a clear list of added keys, removed keys and changed values, each identified by its path in the document, such as address.postcode.
Key order does not count as a difference. If the same keys and values appear in a different order, the documents are reported as equal, because order carries no meaning for JSON objects. Spacing and line breaks are ignored for the same reason.
Value differences and type differences do count. The number 1 and the string "1" are different values, and so are true and 1. A key that is missing is also different from a key present with the value null. The comparison reads values, not text.
The comparison runs entirely in your browser: nothing is uploaded, there is no sign-up, and neither document is changed.
How to use the JSON diff tool
Comparing two documents takes a few simple steps. No installation is needed, and both inputs stay on your device throughout.
- Paste the first document, usually the older or original version, into the first input area.
- Paste the second document, usually the newer or changed version, into the second input area.
- Start the comparison. Both documents must be valid JSON. If either one has an error, the tool reports the problem so you can fix that input.
- Read the list of differences, grouped into added, removed and changed values, each shown with its path and the values involved.
- Use the list to check the change, update the other document, or confirm that two documents hold the same data.
Swapping the inputs swaps the added and removed labels, so keep the original first when added should mean newly present.
Worked example
The two documents below differ in exactly three ways: one value is changed, one key is added, and one key is removed. All other keys and values stay the same. The first document is the original.
{
"name": "Café Luna",
"city": "Lisbon",
"rating": 4.7,
"open": true,
"website": null,
"phone": "+351 21 555 0182",
"address": {"street": "Rua Nova 12", "postcode": "1100-123"},
"tags": ["café", "bakery"]
}The second document is the changed version.
{
"name": "Café Luna",
"city": "Lisbon",
"rating": 4.9,
"open": true,
"website": null,
"address": {"street": "Rua Nova 12", "postcode": "1100-123"},
"tags": ["café", "bakery"],
"seats": 28
}The comparison reports three differences, and nothing else.
Changed rating from 4.7 to 4.9 Removed phone Added seats with value 28
No other differences are reported, because the remaining keys hold equal values. The added key sits at the end, but only its presence counts, not its position.
Rules and edge cases
Every difference falls into one of three kinds. The table below states what each kind means.
| Kind | Meaning |
|---|---|
| Added | A key present in the second document but missing in the first. |
| Removed | A key present in the first document but missing in the second. |
| Changed | A key present in both, with values or types that differ. |
Arrays are compared position by position. The first item is compared with the first item, the second with the second, and so on. If an item moves to a new position, the tool reports changed values at the affected positions. It does not detect the change as a move.
Numbers that parse to the same value are equal, so 1 and 1.0 are not reported as different. Keys are case sensitive, so Name and name differ. If one object repeats a key, only the last value can be compared.
Common mistakes
Most confusion about JSON comparison comes from expecting a text comparison. This tool compares parsed values, so the cases below behave differently from a plain text diff.
- Expecting a different key order to be listed as a change. Order is ignored, so reordering alone produces no differences.
- Expecting a moved array item to be reported as a move. Arrays compare by position, so a move appears as changed values at each affected position.
- Treating the number 1 and the string "1" as equal. Types matter, so values with different types are always reported as changed.
- Confusing a missing key with a null value. A removed key and a key set to null are different results and are reported differently.
- Expecting spacing differences to appear. Whitespace is ignored, so only value differences appear in the list.
When to use diff, and when to choose something else
Use the diff tool when you need to know what changed between two versions: an application programming interface response before and after a fix, a configuration file before and after an edit, or two exports that should match. The path list makes each change easy to find, even in a large document.
Use pretty printing when you only need to read one document more easily, and use a validator when you only need to know whether one document is valid. Neither compares two documents. Use manual reading only for very small documents, where a list of differences adds little.
The diff tool lists differences; it does not merge documents. To merge, apply the listed changes by hand to the document you keep, using the paths as a guide.
Frequently asked questions
Does key order count as a difference?
No. Objects with the same keys and values in a different order are reported as equal. Key order carries no meaning for JSON objects, so only the keys and values are compared.
Do spacing and line breaks count as differences?
No. The tool compares parsed values, so whitespace, indentation and line breaks are ignored. Two documents that differ only in formatting are reported as equal.
Is the number 1 the same as the string 1?
No. Value and type both matter, so the number 1 and the string "1" are reported as changed. The same applies to true and 1, which have different types.
How are arrays compared?
Arrays are compared position by position: first item with first item, second with second, and so on. A moved item is not reported as a move; it appears as changed values at the affected positions.
Is a missing key the same as a null value?
No. A key that is absent is reported as added or removed, while a key present with the value null is a present key holding null. The two cases are reported differently.
What if one document is invalid JSON?
The tool reports the problem instead of comparing. Fix the error in that document, for example a missing comma or bracket, and run the comparison again.
Is my data uploaded anywhere?
No. The comparison runs in your browser on your own device. Both documents stay on your device, and there is no sign-up or account.



