JSON Diff - Compare Two JSON Objects Online

Compare two JSON objects side by side. Find differences, additions, and deletions. Handles nested objects and arrays. 100% client side.

About JSON Diff

This tool compares two JSON objects and shows additions, deletions, and modifications. It handles nested objects and arrays recursively.

Related Tools

Compare JSON Objects: Why Diff Matters in API Workflows

JSON diffing is a daily task for anyone working with REST APIs, configuration files, or feature flags. When an API response changes shape, when a deployment breaks because a config key was renamed, or when you're reviewing a pull request that mutates a large JSON payload — a structural diff is the fastest way to see what really changed. A line-based text diff misclassifies semantically identical objects (different key order, different whitespace) as changes; a JSON-aware diff doesn't.

How structural diffing works

This tool parses both inputs into JavaScript objects, then walks each path recursively. For every key reachable from either side, it reports one of four states: present in A only (deletion), present in B only (addition), changed value, or unchanged. Nested objects and arrays are compared element-by-element so you see exactly which property at which path differs.

Because the comparison is purely structural, key order does not matter — {"a":1,"b":2} and {"b":2,"a":1} are reported as identical. Whitespace and indentation are also irrelevant.

Common pitfalls when diffing JSON

  • Array reordering. Most diff tools (including this one) treat arrays positionally. [1,2,3] vs [3,2,1] shows three changes, not zero. If your data is set-like, sort both sides first.
  • Number representation. 1.0 and 1 are equal numerically but may differ if compared as strings. JSON.parse normalizes them.
  • Trailing commas / comments. Standard JSON forbids both. If your input is JSON5 or JSONC, strip these before pasting.
  • Massive payloads. Browsers struggle past ~5 MB. For larger files, run jq locally with the --rawfile trick or use a server-side differ.

Where this tool fits in your workflow

Frontend engineers use it to compare staging vs production API responses when investigating layout shifts caused by schema changes. Backend teams diff fixture files when migrating between database snapshots. SREs use it to inspect Kubernetes ConfigMap or Secret payloads (after base64-decoding) to see exactly what shipped between releases. Auditors compare exported policy documents — IAM, OPA, Falco — to verify drift before sign-off.

Everything runs in your browser. Both inputs stay on your device — nothing is uploaded. That matters when you're diffing payloads that may contain customer data, internal API responses, or partial credentials. If you need a stricter privacy guarantee, see our zero-knowledge paste guide.

Frequently Asked Questions

Does this tool ignore key order in JSON objects?

Yes. Two objects with the same keys and values but different ordering are reported as identical, since JSON object key order is not semantically meaningful.

How does it handle nested arrays and objects?

Recursively. The tool walks each path on both sides, comparing leaves with strict equality and descending into containers when it finds them.

Can I diff JSON files with millions of entries?

In-browser diffing is best for inputs under ~5 MB. For larger payloads, use a CLI tool like jq, jd, or json-diff on the command line.

Is my JSON sent anywhere?

No. The comparison runs entirely in your browser. Neither input leaves your device.