JSON Diff

Paste two JSON documents and see exactly what changed — structurally, not line by line, and never uploaded.

Both documents are parsed and compared entirely in your browser — nothing is uploaded, and nothing is written to the URL.

Differences are structural: key order and whitespace are ignored, and inserting one array element counts as one addition, not a cascade of changes.

Structural, not line by line

A text diff treats JSON as a wall of characters, so it flags things that aren't differences at all. Reformat a document, sort its keys, or change the indentation and a line-based tool lights up in red — even though the data is identical. This tool parses both sides first and compares the values: {"a":1,"b":2} and {"b":2,"a":1} are the same document, and it says so.

Array insertions are one change, not many

The other half of the problem is arrays. Insert one element at the front of a five-element list and a naïve comparison — pairing index 0 with index 0, index 1 with index 1, and so on — reports every position as changed. This tool aligns array items with a longest-common-subsequence match, the same idea behind git diff, so that insertion is reported as exactly one addition and the rest of the list is untouched. Where a removal and an addition land next to each other, they are merged into a single "changed" entry, so [1,2,3] versus [1,9,3] reads as one change from 2 to 9.

If you are comparing lists whose order is not meaningful — a set of tags, a list of permissions — tick Ignore array order and items are matched by value wherever they appear.

What counts as a difference

ComparisonResultWhy
1 vs "1"changednumber and string are different types
1 vs 1.0sameboth parse to the number 1
null vs missing keyremoved/addeda null value is not the same as no key
{} vs []changedobject and array are different types
key ordersameJSON objects are unordered

Numbers compare by parsed value, which is usually what you want — but it also means floating-point artifacts are real differences: 0.30000000000000004 is not 0.3.

Nothing leaves your browser

The documents people diff are exactly the ones they should be careful with: configuration files with credentials in them, API responses containing customer data, infrastructure manifests. Both sides are parsed and compared locally, nothing is uploaded, and — unlike most calculators on this site — nothing is written to the URL, so no fragment of your data ends up in browser history.

Related tools: the JSON formatter to pretty-print or validate a single document, the JWT decoder if you want to diff two decoded token payloads, and the YAML, XML, CSV, and text diff tools for other formats.