JSON Diff: Compare Two JSON Objects Online

Paste two JSON documents, compare them structurally, and see every difference highlighted instantly — all in your browser.

Left (Original)

Drop JSON file

or click to browse

Accepted: .json

Right (Modified)

Drop JSON file

or click to browse

Accepted: .json

Frequently Asked Questions

Does key order affect the JSON diff result?

No. JSON objects are unordered by specification. The tool normalizes key order before comparing, so {"a":1,"b":2} and {"b":2,"a":1} are treated as identical.

Can I compare deeply nested JSON structures?

Yes. The JSON diff engine recursively walks all levels of nesting and reports differences by their full path (e.g., /user/address/city). There is no depth limit.

Is my JSON data uploaded to a server?

No. All comparison processing happens locally in your browser using JavaScript. Nothing is transmitted to any external server — your data stays on your machine.

How does the tool handle JSON arrays?

By default, arrays are compared by index position. You can enable "Ignore Order" to compare arrays regardless of element order, which is useful when array items have been reordered but the data is semantically the same.

What is the maximum JSON size I can compare?

The tool handles documents up to several megabytes. Performance depends on your browser, but typical API payloads (under 1 MB) diff in under 100ms.

Can I use this for API debugging?

Absolutely. Paste the expected response and the actual response side by side. The diff immediately reveals renamed keys, changed types, missing fields, and unexpected additions — saving significant debugging time.

What is the difference between a text diff and a JSON diff?

A text diff compares raw lines character by character — reformatting alone would flag every line as changed. A JSON diff understands structure, ignores whitespace and key order, and reports changes at the value level with full path context.

JSON Diff: Compare Two JSON Objects & Find Differences Online

Two JSON documents are compared structurally by this JSON diff tool and every difference — additions, deletions, and changed values — is highlighted instantly in your browser. Unlike a plain text diff, JSON semantics are understood: reordered keys aren't flagged as changes, whitespace is ignored, and nested modifications are tracked precisely by their full path. Whether API responses need to be diffed, config files compared, or migration scripts validated, everything runs client-side. Also searched as "jsondiff", "compare json", "json comparator", and "diff json".

How the JSON Diff works

Both inputs are parsed into structured objects, then each level is recursively walked comparing values by their JSON path (e.g., /user/address/city). Objects are compared regardless of key order — {"a":1,"b":2} and {"b":2,"a":1} are treated as identical. Arrays are compared by index. The result follows the JSON Patch format (RFC 6902), so changes can be exported and applied programmatically.

Diff JSON from APIs, configs & test fixtures

JSON comparison is commonly used during API debugging, CI pipeline validation, and incident response. The expected response can be pasted alongside the actual one to instantly reveal renamed keys, changed data types, missing nested objects, and array differences. Also useful for reviewing serializer changes in pull requests and validating data migration outputs.

Semantic comparison vs. text diff

A text diff compares raw lines character by character — reformatting a JSON file would show every line as changed. A semantic JSON diff (jsondiff) understands structure and reports only meaningful value-level changes with full path context. Noise from whitespace, key ordering, and formatting differences is eliminated.

Privacy & performance

All processing happens locally in your browser using JavaScript. No data is uploaded to any server. Payloads up to several megabytes are handled, with typical API responses diffed in under 100ms.