JSON Diff
Compares two JSON documents structurally, ignoring key order and reporting added, removed and changed paths.
Compares two JSON documents structurally rather than as text, so a reordered key or different indentation is not a difference. The output is both a readable table of what changed and an RFC 6902 patch that turns the left document into the right one exactly.
Line the two arrays up first, so one insertion is one change rather than a hundred.
Left
Right
How to use it
Paste both documents
Two API responses, two configs, a before and an after. The comparison runs in a worker and updates as you type.
Choose how arrays are compared
This is the setting that decides whether the result is useful. Align lines the two arrays up first, so inserting one element is one change. By index compares position for position, which is right when the order is the data. By key matches elements on a named member — the answer when two responses list the same things in a different order.
Decide whether null means absent
Some serialisers omit an empty field and some write `null`. If you are comparing output from two different stacks, turning this on removes a page of false differences.
Take the table, or take the patch
The table is for reading; the patch is for applying. Paths in both are RFC 6901 pointers, so they paste into any tool that speaks JSON Patch.
Common questions
Why does one inserted array element show as a hundred changes?
Because the array mode is By index, so element 1 is being compared with element 2 and everything shifts. Switch to Align, which lines the arrays up first, or to By key if the elements have an id.
Can I apply the patch here?
No, this page only produces it. But the patch is exact: applying it to the left document yields the right one byte for byte in the data model, and that round trip is what the test suite asserts on every change.
It says the two documents are not related.
That message appears when the comparison passes twenty thousand changes and stops. At that point the diff is not telling you anything useful — you are comparing two different documents rather than two versions of one.
Does key order ever matter?
Not to this tool — JSON objects are unordered, so two documents that differ only in key order are reported as identical. If key order matters to your consumer, that consumer is relying on something JSON does not promise.
Feed it from
Text Diff
Compares two texts side by side or inline, at line, word or character granularity.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
JSONPath Tester
Runs a JSONPath expression against a document and highlights the matched nodes as you type.
OpenAPI Diff
Compares two OpenAPI documents and separates breaking changes from additive ones.
Next
These accept what this tool produces, so the result can go straight in.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
JSONPath Tester
Runs a JSONPath expression against a document and highlights the matched nodes as you type.
OpenAPI Diff
Compares two OpenAPI documents and separates breaking changes from additive ones.
Text Diff
Compares two texts side by side or inline, at line, word or character granularity.
Base64 Encoder & Decoder
Encodes and decodes Base64 and Base64URL for text or files, handling UTF-8 correctly.
curl to Code
Converts a curl command into fetch, axios, Python requests, Go, PHP or PowerShell.