JSON compare
ClientPaste two JSON documents and compare structure and values. A small example is pre-filled so you can try Compare immediately—parsing and diffing stay in your browser tab.
Learn more: comparing structured data
Compare two JSON values side by side to see what changed—useful for config diffs, API responses, or before/after debugging.
Structural diff
Unlike plain text diff, JSON compare can align objects and arrays by structure, so you spot added or removed fields and changed values without noise from whitespace alone.
When to use it
Typical uses include reviewing migrations, verifying that two environments return the same shape of data, and narrowing down a bug to a single field.
How to compare two JSON documents
Paste or edit JSON in the left and right panels—a small example is pre-filled so you can click Compare immediately. Both sides must parse as strict JSON before paths are computed.
The diff list shows JSON Pointer–style paths where values differ, were added, or were removed. Use JSON sort keys first when your team ignores object key order but cares about nested values.
Limits & edge cases
Comparison runs on parsed values, not raw text—whitespace and key order may differ while the structure matches. Normalize lax JSON on JSON5 / JSONC before comparing if one side rejects parse.
Very large pastes can stress the tab; trim to the subtree you care about. For line-oriented wire captures, use plain text diff instead.
Two JSON inputs
?
Compare parses both sides with JSON.parse and walks values recursively. Objects and arrays are ordered by keys / indices; missing keys or length mismatches are reported as paths under $.
After Compare, both sides are pretty-printed; lines that differ in the formatted text are highlighted in each editor. Paths below list semantic differences (JSON structure). Editing a panel clears highlights.
Drag the divider between panes on desktop to widen one side. Use fullscreen for a 50/50 split across the browser (Escape to exit).
All processing stays in your browser. Very large documents may be slow.
452 characters total
Both sides load a sample by default—click Compare to format, list paths, and highlight differing lines.
Nearby workflows on Toolcore
- JSON sort keys — so key-order noise does not hide real value changes.
- JSON formatter — to pretty-print both sides after strict parse succeeds.
- JSON canonicalization (JCS) — when you need a deterministic byte sequence before hashing or signing.
- Plain text diff — for line-oriented review of raw wire captures.
Common use cases
- Review config or API diffs when only JSON structure matters—array order and nested keys surface as paths.
- Sanity-check two exports from the same service after a version bump.
- Compare normalized parses after formatting messy payloads on both sides.
- Spot accidental field renames or missing keys between two fixture files before merging.
- Pair with deterministic key sorting when your team ignores key insertion order during review.
- Validate that a repaired or JSON5-normalized document still matches a golden fixture.
Common mistakes to avoid
Expecting text diff semantics
This tool compares parsed values. Whitespace and key order may differ while the structure matches—use the path list to understand what changed.
Forgetting duplicate object keys
JSON parsers keep the last duplicate key. If two sources look similar in a text editor but differ logically, compare after parse to see the effective value.
Treating array order as ignorable when it matters
Arrays are ordered in JSON. If order is business-critical (queues, steps), a path diff on array indices is meaningful.
Comparing payloads that parse with different lax rules elsewhere
Both sides must be strict JSON here. Normalize JSON5-like sources on another page before comparing if one side rejects parse.
Diffing before both sides parse cleanly
Fix syntax on the JSON formatter first—partial or invalid JSON will not produce a meaningful structural diff.
FAQ
Is my JSON sent to Toolcore?
No. Both documents are parsed and compared locally in your browser.
Will Unicode lookalikes show as differences?
Comparison is on parsed string values. Visually similar characters that decode to different code points will differ; normalize upstream if you need NFC or NFKC rules.
What if one side is huge?
Very large pastes can stress the tab. Trim to the subtree you care about, or compare smaller exports first.
How is this different from the plain text diff tool?
This page understands JSON values and emits structural paths; the text diff follows lines regardless of parsing.
Should I sort keys before comparing?
When key order is not semantically meaningful, run both documents through JSON sort keys first so added or removed fields stand out.
Does this validate against JSON Schema?
No. It only compares two parsed values. Use JSON Schema validate when contract rules matter beyond equality.
Common search terms
Phrases people search for that match this tool. See the full long-tail keyword index.
- compare two json online
- json diff side by side
- json comparison tool free
More tools
Related utilities you can open in another tab—mostly client-side.
JSON formatter
ClientJSON format online: pretty-print, minify, validate, escape, download .json.
JSON Merge Patch
ClientRFC 7396 merge patch against a base document—recursive merge, null removes keys.
JSON sort keys
ClientRecursively sort object keys for stable JSON text—pretty or minify, client-side.
Plain text diff
ClientCompare two text drafts side by side—unified view, sample pre-filled, client-side.