JSON Compare Online

A practical workflow for comparing two JSON payloads without letting whitespace hide the real changes.

Workflow

Format both JSON documents first, sort keys when the order is not meaningful, then compare the normalized output. This makes changed values and missing fields much easier to see.

Example

Before:
{"user":{"id":1,"role":"admin"}}

After:
{"user":{"id":1,"role":"editor"}}

Meaningful change:
user.role changed from admin to editor

What to Watch

Key / CodeDescription
Object key orderUsually not meaningful in JSON APIs
Array orderOften meaningful, especially for ranked or ordered data
Number vs string42 and "42" are different values
Missing vs nullA missing key is not the same as a null key

Related

Knowledge is power.