Formatter Validator Minifier JSON ↔ YAML JSON → CSV JSON ↔ XML JSON Diff Schema Validator JSONPath Tester JWT Decoder More Tools Blog FAQ
Side-by-side comparison · Semantic diff · Key order ignored

JSON Diff Tool

Compare two JSON documents and instantly see what changed. Semantic comparison ignores key order — only real differences are reported. Color-coded results show added, removed, and modified fields.

Left (original)
Right (modified)
Differences
Paste two JSON documents above and click Compare
Why semantic JSON diff matters

Why semantic JSON diff matters

Regular text-based diff tools (like the diff command, or git's default diff) compare files line by line. For JSON, that's often wrong. Two JSON documents can be byte-different but logically identical — different key order, different whitespace, different number formatting — and a text diff will mark every line as changed.

A semantic JSON diff understands the underlying data model. It parses both documents, then compares the resulting structures recursively. Key order doesn't matter because JSON objects are unordered. Whitespace doesn't matter because it's not part of the data. Only real differences — actual changes to keys or values — are reported.

This matters in real workflows: comparing API responses across versions, reviewing config changes, validating that a transformation preserved data correctly, or auditing what changed between deployments.

How the diff works

How the diff works

Our diff algorithm walks both JSON trees in parallel, classifying each difference:

+ Added

Keys or array items present in the right document but not the left. Shown in green with their values.

Removed

Keys or array items present in the left document but not the right. Shown in red.

Changed

Same key in both, different values. Both old and new values are displayed so you can see what changed.

= Unchanged

Identical values are omitted from output by default — keeps the diff scannable for big documents.

Each difference is labeled with a JSONPath-style location like $.users[2].email, making it easy to see exactly where in the structure the change occurred. Even for deeply nested data, you can navigate directly to the changed field.

When you need a JSON diff

When you need a JSON diff

Common questions

FAQ — Json Diff

Does key order matter in the comparison?
No. JSON objects are unordered by specification, so {"a":1,"b":2} and {"b":2,"a":1} are reported as identical. This is what makes the comparison semantic rather than textual.
How are arrays compared?
Arrays are compared positionally — index 0 in the left compared with index 0 in the right, index 1 with index 1, and so on. If lengths differ, extra items are shown as added or removed. For order-insensitive array comparison, sort both arrays first (semantically the same, but tooling rarely makes this assumption).
Why does my 'identical' JSON show as different?
Two common causes: (1) one document has values as strings while the other has them as numbers — {"id":"42"} is different from {"id":42}; (2) one has a trailing whitespace character or BOM that's not visible but affects parsing. Try formatting both with the JSON Formatter first to normalize.
Can I compare two arrays at the top level?
Yes. The comparison works at any level — top-level arrays, objects, or even scalar values. For top-level arrays, you'll see additions/removals/changes at each index.
Are nested differences reported with full paths?
Yes. Every difference is labeled with a JSONPath-style location: $.users[2].address.city. This makes it easy to find the change in a large document and to communicate the change to others.
What's the largest JSON I can diff?
Comfortably up to about 10 MB per document. The diff algorithm is linear in document size, so it scales well, but the UI gets sluggish rendering huge result sets. For multi-hundred-megabyte documents, use a CLI tool like json-diff.
How is this different from text-based diff (like the diff command)?
Text diff compares characters; semantic JSON diff compares meaning. Text diff might mark hundreds of lines as changed when only one value differs (because reformatting moved everything). Semantic diff identifies the one actual change.
Can I diff three or more JSON documents?
Not in a single operation — this tool compares two at a time. For three-way merge (like git uses), you'd need a specialized tool. You can chain diffs: compare A vs B, then B vs C.
Does the diff handle numeric precision?
Yes, JavaScript-native — meaning IEEE 754 double precision. Numbers that differ by less than the smallest representable difference compare as equal. For exact decimal precision (financial data), store numbers as strings.
Can I export the diff as a JSON Patch?
Not currently. We display human-readable differences but don't emit RFC 6902 JSON Patch operations. If that would help you, let us know on the contact page — it's a reasonable feature request.
Our Network