ENRU

JSON Diff

I see what changed. I don’t ask why.

Original

Original goes here.

Paste, open or drop a file.

Modified

Modified version goes here.

Paste, open or drop a file.

Changes

Two documents in. One verdict out.

Key order doesn’t count. Numbers are compared by exact value: 1.0 equals 1.00. Ctrl+Enter compares.

I compare values, not feelings.
— JSON Statham
Waiting for JSON.
left 0 B · right 0 BAPI

Paste two JSON documents and get every difference as a path: added, removed, changed. Key order doesn’t count. Values do.

How it works

  1. Paste the original on the left and the modified version on the right, or drop two files.
  2. Press Ctrl/Cmd+Enter.
  3. Step through the changes with n and p; copy the list or download the report.

How changes are counted

Objects are compared by key, whatever the order. Arrays are matched element to element, order kept: an item inserted at the start shows as one added. Numbers are compared by exact decimal value, never through floating point. Whitespace doesn’t count.

FAQ

Does key order count as a difference?

No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are identical. Array order does count.

How are arrays compared?

Elements are matched in order, so an item inserted at the start shows as a single added entry at /…/0, and nothing after it moves. Very large arrays (more than 1,000,000 element pairs) fall back to index by index.

What are paths like /team/0/callsign?

JSON Pointer (RFC 6901): the address of a value inside the document. Each segment is a key or an array index; ~ is written as ~0 and / as ~1.

Are numbers compared exactly?

Yes, by decimal value, without floating-point rounding: 12345678901234567890 and 12345678901234567891 are different.

Other tools

Keyboard shortcuts

Everywhere
Ctrl+EnterRun the page’s main action
Ctrl+OOpen a file
Ctrl+SDownload the result
F8 / eJump to the error
/Focus the input
qAnother quote
?This help
EscClose
Diff
n / pNext / previous change
xSwap sides

Keys like q, n, p work when the cursor isn’t in an editor.