Skip to content
DeveloperTools

JSON Compare

Private

Original

Changed

Differences

About this tool

Paste the original on the left and the new version on the right. The two are compared as data rather than as text: objects are matched key by key, so reordered keys, different indentation and single versus double quotes never count as a change. What does count is drawn onto the editors themselves — removed properties in red, added ones in green and changed values in amber, with the old and the new value picked out — and listed under them by path, like $.items[2].qty, with both values side by side. Click a row, or use the arrows in the toolbar, to bring a difference into view on both sides.

Either side can be strict JSON or a JavaScript object literal: unquoted keys, single quotes, trailing commas, comments and Python-style True and None are all read by the same tolerant parser as the JSON Formatter, so a value copied from source code compares directly against an API response. Numbers are compared by value, so 39.5 equals 39.50 and 1e2 equals 100, while integers too large for a double are compared digit by digit. A side that does not parse is reported by line and column, with the offending token underlined.

Arrays keep their order and are aligned the way a text diff aligns lines, so one inserted item is reported as one addition rather than shifting everything after it, and an edited object inside an array reports the field that changed rather than a whole replaced object. Turn on "Ignore array order" to compare lists as sets, and "Unwrap nested" to compare a string holding escaped JSON as the document inside it. The "Sort keys & format" button rewrites both sides with sorted keys, for when you want the two texts to line up as well.

Nothing you paste is transmitted. The page is static HTML and the comparison runs in your tab, so production payloads, tokens inside config files and customer records never leave your device.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Parsing and comparison are JavaScript running in your browser, and the page has no backend to send anything to. You can disconnect from the network and the tool keeps working.

Does key order count as a difference?

No. Objects are compared key by key, so {"a":1,"b":2} and {b: 2, a: 1} are the same data. When keys do come in a different order the toolbar says how many objects were affected, so you know the texts differ even though the data does not. Array order does count, unless you turn on "Ignore array order".

Can I compare a JavaScript object with JSON?

Yes. Unquoted keys, single-quoted and backtick strings, trailing commas, // and /* */ comments, and the True, False and None of Python output are all accepted on either side. Expressions are not evaluated, though: a function call or a variable reference is reported as a syntax error, with its line and column.

How are arrays compared?

In order, aligned like lines in a text diff: items that are equal on both sides anchor the comparison, and the items between two anchors are paired up and compared in depth. An item that moved shows as removed in one place and added in another. With "Ignore array order" on, each item matches any equal item on the other side instead.

How large a document can I compare?

The limit is your browser memory rather than an upload cap. Documents of several megabytes compare in a fraction of a second; past roughly 400 KB per side the marks inside the text switch off to keep typing smooth, while the line markers and the list of differences keep working.

Can it output a JSON Patch or merge the two sides?

Not yet. The tool reports and marks every difference, but it does not generate an RFC 6902 patch or apply one side onto the other. Both editors stay editable, so you can reconcile the two by hand and watch the list empty.

Arrow keys to navigate, Enter to open, Esc to close