JSON Diff — Compare Two JSON Documents
Structural comparison, not a text diff — reordered keys and reformatting are ignored, only real value changes are shown as added, removed or changed.
Why a structural diff beats a text diff for JSON
Paste your JSON into a generic line-diff tool and you drown in noise: reindent one side, or let two APIs serialize the same object with keys in a different order, and every line looks changed. This tool compares the data — it parses both documents and walks them by path, so {"a":1,"b":2} and {"b":2,"a":1} are identical, and only genuine value differences are reported.
How to read the result
- + added — the key or array index exists only on the right.
- − removed — exists only on the left.
- ~ changed — present on both, but with a different value (a type change like
3→"3"counts).
Each row shows the exact path ($.env.LOG_LEVEL), so you can jump straight to what moved. "Identical" means the data matches even if the text does not.
A note on arrays
Arrays are compared by position — index 0 against index 0. That is correct for ordered data (a list of steps, coordinates, a changelog), but it means inserting an element near the front marks everything after it as changed. If your arrays are really unordered sets, that positional view will over-report; sort both sides consistently first. Need to canonicalize object key order across a whole file before comparing text elsewhere? The JSON Sorter does that.
Frequently asked questions
Is this a text diff or a structural diff?
Structural. It compares the two documents by value and path, not line by line — so reordering keys, changing indentation, or minifying one side does not create false differences. Only genuine data changes are reported.
How are array changes handled?
Arrays are compared by index: element 0 vs element 0, and so on. Inserting an item near the start therefore shows every following index as changed — that is honest for positional data. If your arrays are unordered sets, sort both sides first (with the JSON Sorter is for keys; for array values, sort in your own tooling).
What do added, removed and changed mean?
Added = the key/index exists only on the right. Removed = exists only on the left. Changed = exists on both but with a different value (including a different type, e.g. number to string).
Does key order matter?
No. Objects are compared by key regardless of order, so { "a":1, "b":2 } and { "b":2, "a":1 } are identical. This is what makes the diff useful for comparing API responses or config exports that serialize keys differently.
Is my data uploaded anywhere?
No — both documents are parsed and compared entirely in your browser. Nothing is sent to a server, so comparing production configs or payloads is safe.