Skip to content
← Back

JSON Diff Tool - Online JSON Data Comparison

Data
Runs locally · Not uploaded

Online JSON diff comparison tool: visually compare two JSON objects and highlight added, removed, and modified fields. Supports array comparison.

Was this result helpful?

For local tools, open DevTools → Network and search your input — it should not appear in requests.

Usage Guide

When two JSON configs "look the same but behave differently", you need structural comparison, not eyeballing. This tool compares field by field, listing additions, removals and value changes with their paths, in real time — ideal for API response changes and environment config reviews.

1. Compare two JSONs

  1. Old config on the left, new on the right; differences list live by field path.
  2. Reading: added means the right side has an extra field, removed means the left side had one, and a path like config.timeout with "old → new" is a modification.
  3. Syntax errors on either side are reported separately — both must be valid JSON for the comparison to mean anything.

2. How it splits work with text diff

  • Structural comparison ignores key order and indentation: {"a":1,"b":2} versus the same data pretty-printed is "no difference" — exactly where it beats text diff.
  • Conversely, when the format itself matters (indent style, key order), use text diff; when the data matters, use this tool.
  • Arrays compare positionally by default: reordered elements show as modifications; for order-insignificant arrays (tags, permission lists) enable "Ignore array order" to match as multisets.

3. Noise-free diffing and JSON Patch export

  • Ignore keys: list churn fields like updatedAt, traceId — skipped at any depth, leaving only signal in the diff list.
  • Array key: for shuffled object arrays, align on a business key (e.g. id) — same-key rows report field-level diffs like users[id=7].name instead of whole-row add/remove.
  • Copy JSON Patch: one click exports an RFC 6902 operation sequence ready for fast-json-patch replay; note the patch is unavailable in "ignore array order" mode since paths carry no index semantics.
  • Leftover-element pairing in ignore-order mode is an O(n²) greedy pass — pair it with an array key for shuffled arrays of a thousand elements or more.

4. Choosing among four diff granularities

JSON comparison has four levels: textual (line-diff the raw strings) for formatting changes; key-level (compare by key path) for response regression; semantic (numeric tolerance, arrays as sets) for floats and unordered arrays; structural (schema shape) for add/remove audits. This tool aligns at key level — the mainstream need during integration debugging: which field changed between two versions of a response. Array alignment is the biggest variable in key-level diffing: index-by-index (strict but order-sensitive) versus aligning on a business key (say id) can yield entirely different results — confirm whether the array ordering is guaranteed before comparing.

5. The standard integration-debugging loop

  1. Save the same endpoint response from staging and production as two JSON files.
  2. Diff them here and jump straight to the first divergent path — two orders of magnitude faster than eyeballing thousands of lines.
  3. Trace each divergent field: dirty data or a serialization-logic change.
  4. After the fix, replay the diff and confirm the delta collapses to zero.

6. Option combos and acceptance

Combine ignore-keys, array align-key, and ignore-order carefully: drop churn fields first, align object arrays on a business key, then treat unordered tag lists as multisets. JSON Patch needs stable indexes — unavailable in ignore-order mode. Validate both sides as JSON before reading the list; replay until paths collapse.

FAQ

JSON Diff compares by field path and ignores key order and indentation — {"a":1,"b":2} and the same data pretty-printed across lines register as no difference. Use this tool for data differences; switch to a text diff when you actually care about formatting churn like indent style or field order.

Paste the old JSON on the left and the new on the right; diffs stream out by field path. added marks fields only the right side has, removed marks left-only fields, and the "old → new" pair after a path like config.timeout is a modification. Nested objects and arrays expand recursively, and syntax errors on either side are reported separately — both inputs must be valid JSON before comparing means anything.

By default arrays compare positionally, so reordering shows up as diffs; for order-insignificant arrays (tags, permission lists) enable "Ignore array order" to match as multisets. When elements are objects with an id, also fill in the "Array key" to align on the business key (users[id=7].name), getting both order-insensitivity and field-level precision. Note that matching unordered leftovers is an O(n²) greedy pass — for arrays with thousands of elements, pair it with an alignment key.

Yes. "Copy JSON Patch" exports an RFC 6902 operation sequence (add/remove/replace) ready for replay by libraries like fast-json-patch; "Ignore keys" skips churn fields like updatedAt or traceId at any depth. Patch export is unavailable in "ignore array order" mode since paths carry no index semantics.

Save the same endpoint's response from test and production as two JSON files, then let the tool jump straight to the first differing path — orders of magnitude faster than eyeballing thousands of lines. Trace whether the field changed because of dirty data or serialization logic, fix it, and re-run the diff until it converges to zero.

Nowhere: comparison happens inside the current tab, and the page makes no request carrying your data.

Related Tools

Related Articles