JSON

JSON Diff / Compare

Compare two JSON documents — what was added, removed, or changed, with an exact path to each difference.


                        
                    

Unlike a plain text diff, JSON Diff compares two documents by structure rather than by line: it understands that key order in an object doesn't matter, and it shows the exact path (e.g. user.address.city) to every difference.

How to use it

Common uses

Things to keep in mind

Array elements are usually compared by position (index) — inserting one element near the start can show every following item as "changed", even though they merely shifted.

The comparison is structural, not textual — two JSON documents with identical data but different formatting or key order are treated as the same.

Article about this tool: JSON Diff: how structural comparison differs from text comparison

Frequently asked questions

What does this tool show?

It compares two JSON documents and reports what was added, removed, or changed, with an exact path to each difference — handy for seeing what actually changed between two versions of a config, API response, and so on.

Why do reordered array items show up as "changed"?

Array comparison is typically position-based, not content-based. If the same items appear in a different order, the diff reports them as changed rather than recognizing they were simply moved.

Are the documents sent to a server for comparison?

No — the comparison runs entirely in your browser via JavaScript, and the data never leaves your device.

Does the order of object keys affect the comparison result?

No, structural comparison only looks at the data itself — whether a field exists, its value, and its type. Key order in a JSON object is not semantically significant, so it has no effect on the result.

Can array elements be compared by identifier instead of position?

It depends on the specific comparison algorithm. Simple diff tools always match array elements by index; more advanced ones try to match objects by a shared field like id to more accurately show an insertion or removal.

Articles: JSON