100% local — your data never leaves your browser

JSON Diff — See Which Value Changed

Compare two JSON documents. Indentation and key order are neutralised first, so what you see is what actually differs — down to the last digit.

Instant Private Zero cookies

Original

Modified

Differences

What this tool does

It normalises both sides — two-space indentation, keys sorted — then compares them line by line and shows the result as a unified diff:

@@ -2,4 +2,4 @@
   "host": "localhost",
-  "port": 8080,
+  "port": 3000,
   "tls": true

- is the original, + is the modified, and the @@ line gives the region. It is the format git diff and patch speak.

What counts as a difference

difference?
Indentation, line breaksno
Key order in an objectno, by default
Element order in an arrayyes
A value that changedyes

Objects and arrays are treated differently because JSON treats them differently: an object is an unordered set of pairs, an array is a sequence. Reordering the keys of an object gives the same value; reordering the elements of an array gives another one.

Down to the last digit

{ "id": 12345678901234567890 }
{ "id": 12345678901234567891 }

These two documents differ, and this tool says so.

That is worth stating because it did not use to. Normalising both sides through a plain JSON parse sent every number through a double-precision float, and the two identifiers — twenty digits, differing only in the last — collapsed into the same value. The diff came back empty, which reads as no differences.

An empty diff is an assertion, not a shrug. A comparison tool is precisely the one you ask to see what your eyes cannot, so both sides are now read without loss and compared as written.

Duplicate keys are reported

If one of the two documents repeats a key, the comparison stops and says so, exactly as the JSON formatter does. Keeping only the last of each — what most parsers do quietly — would let a genuine difference between the two files vanish before the comparison even starts.

Private by design

Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.

Frequently asked questions

Why is reordered JSON shown as identical?
Because a JSON object is an unordered set of name/value pairs, so two documents whose keys appear in a different order hold the same value. Both sides are sorted before comparing. Turn the setting off if you want to see the reordering itself — before and after a tool that rewrote the file, for instance.
Why are reordered array elements a difference?
Because an array’s order *is* part of its value. `["read", "write"]` and `["write", "read"]` are two different JSON values, and a diff that hid that would hide a change in the order of migrations, of pipeline steps, of anything sequential.
What if the same key appears twice in one of the files?
It is reported rather than silently resolved — the same answer the JSON formatter gives. Comparing two documents by keeping only the last of each repeated key would let a real difference disappear between the two files.

Related converters