JSON Diff — Compare Two JSON Objects Online

This JSON diff tool compares two JSON objects and highlights every added, removed, and changed value with color-coded results. The diff algorithm recursively traverses nested structures and reports differences using full dot-notation paths. All comparison logic runs entirely in your browser. Your JSON never leaves your device. Paste both objects above and see the diff instantly.

Frequently Asked Questions

How do I compare two JSON objects?

Paste the first JSON into the "JSON A" panel and the second into "JSON B". The diff runs automatically and shows all differences below: added keys in green, removed keys in red, and changed values in amber. A summary counts each type of change.

What does JSON diff show?

The diff shows four categories: added (keys present in B but not A), removed (keys present in A but not B), changed (keys present in both but with different values), and unchanged (identical in both). You can toggle unchanged entries on or off. For changed values, both the old and new values are shown side by side.

Can I diff nested JSON objects?

Yes. The diff recursively traverses nested objects and arrays. Paths to nested keys use dot notation (e.g. user.address.city) and array indices use bracket notation (e.g. items[0].price). Every leaf-level difference is reported with its full path.

Is my JSON sent to a server for comparison?

No. The entire diff algorithm runs in your browser using plain JavaScript. No data is transmitted. You can disconnect from the internet after the page loads and the diff tool will continue to work.

What is the difference between JSON diff and merge?

A JSON diff shows what changed between two objects — it is read-only and non-destructive. A merge combines two objects into one, resolving conflicts. formatjson.app's diff tool is purely for comparison: it highlights differences but does not produce a merged output.