JSON Diff

Compare two JSON documents node by node, ignoring key and array order.

Left raw, minified, escaped JSON or a log line, or drop a file
Right raw, minified, escaped JSON or a log line, or drop a file
Left
Right
− only in Left + only in Right ~ different Runs locally · nothing is uploaded

Online JSON diff: compare two JSON documents

Paste two JSON documents, or open two JSON files, and see exactly how they differ. The JSON diff compares them node by node rather than line by line, so reordered keys, reordered arrays and different formatting are not reported as differences. Input can be minified, pretty printed, escaped, or still wrapped in a log line; the output is always formatted and aligned side by side.

Features

How to compare JSON

  1. Paste one document into Left and the other into Right, or drop a file on each side. Drop two files at once to fill both.
  2. Press Compare, or Ctrl/⌘ + Enter. Dropped and opened files compare automatically.
  3. Jump between differences with Prev/Next, or press p and n.
  4. Turn on Only show differences to collapse unchanged parts of large documents.
  5. Press f or the maximize button next to Next to give the comparison the whole window; Esc restores it.

Frequently asked questions

Does the JSON diff care about key order?

No. Objects are compared key by key, so {"a":1,"b":2} and {"b":2,"a":1} are equivalent.

How are arrays compared when array order is ignored?

Equal items are paired wherever they are. Remaining objects are paired with the most similar object on the other side, and their inner differences are shown. Items with no partner are shown as only in Left or only in Right. Turn off Ignore array order when position matters.

Are 1 and 1.0 different?

No. Numbers are compared by exact decimal value, so 1, 1.0 and 1e0 are equal, while large IDs such as 7234567890123456789 are never rounded. A number and a string, such as 1 and "1", are different.

Is my JSON data safe?

Yes. The comparison runs in your browser. Nothing you paste or open is sent to a server or stored. Files you open are read on your own device and are never uploaded.