Skip to main content

JSON Diff — Compare Two JSON Documents by Key Path

Structural JSON compare — added / removed / changed keys by path, three-colour tree, browser-only

  • Runs locally
  • Category Developer & DevOps
  • Best for Formatting, validating, shrinking, or inspecting code-adjacent text.
Added
0
Removed
0
Changed
0
Unchanged
1
Paste JSON on both sides to see a structural diff.

What this tool does

Free online structural JSON diff. Paste the original JSON on the left and the new JSON on the right; instead of comparing raw text lines, this tool parses both sides and walks the object/array tree, reporting exactly which key paths were added, removed, or changed — for example `user.address.city` changed from "Berlin" to "Munich", or `items[2]` was removed. That distinction matters: a text diff of two JSON files flags a whole line as different the moment a key is re-ordered or whitespace shifts, even though the data is identical. A structural diff sees through formatting, key order, and indentation, so you only get signal that reflects real data changes. Three options tune what counts as a change: ignore array order (compare arrays as unordered multisets, useful for tag lists or permission sets), sort keys before compare, and trim whitespace inside strings. The result is a colour-coded tree — cyan for added, pink for removed, violet for changed — plus a running count of each category and a one-click copyable summary you can paste into a code review or bug report. If either side is not valid JSON, you get a clear message saying which side failed and the parser error, so you fix the typo instead of guessing. Everything runs in your browser tab; neither payload is uploaded, which makes it safe for API responses, config files, and feature-flag snapshots that should not leave your machine.

Tool details

Input
Text + Structured content
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 12 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Developer & DevOps · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How JSON Diff fits into your work

Use it in the small gaps between coding, reviewing, debugging, and shipping.

Developer jobs

  • Formatting, validating, shrinking, or inspecting code-adjacent text.
  • Preparing snippets for documentation, tickets, commits, or handoff.
  • Checking a small payload quickly without switching tools.

Developer checks

  • Run irreversible transforms like minify or obfuscate on a copy.
  • Keep secrets out of pasted snippets unless the tool explicitly stays local.
  • Use your normal tests or linter before shipping transformed code.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Text Diff Compare two blocks of text — line-by-line additions, deletions, equal — colour highlighted, browser-only Open
  2. 2 JSON Formatter & Validator Format, validate, and minify JSON instantly — right in your browser. Open
  3. 3 JSON Minifier Minify JSON into a compact single line, optionally sort object keys, and keep everything local. Open

Real-world use cases

  • Review an API response change before merging

    A backend PR claims it "only adds a field" to the user endpoint. Capture the response before and after, paste the two payloads into the left and right boxes, and read the tree: if the only node is `+ data.user.timezone`, the claim holds; if you also see `~ data.user.role` changed or `- data.user.email` removed, you caught an unintended break. Copy the summary into the PR thread as evidence.

  • Diff two config or feature-flag snapshots

    Production behaves differently from staging. Export both config JSONs, paste them in, and the diff shows exactly which flags differ — e.g. `~ flags.checkout.newFlow: false → true`. No eyeballing two 400-line files. Turn on "Sort keys before compare" if the two exporters emit keys in different orders.

  • Verify a data migration kept records intact

    After transforming a records file, paste the source on the left and the migrated output on the right. Expected changes (a renamed key, an added `migratedAt`) should be the only nodes shown. Anything else — a dropped `items[3]`, a number coerced to a string — is a migration bug surfaced with its exact path.

  • Compare a fixture against a live response in tests

    A snapshot test fails but the assertion message is a wall of text. Paste the expected fixture and the actual response here to see the three or four key paths that actually differ, instead of scrolling a diff that flagged the whole object because key order shifted. Enable "Ignore array order" when the endpoint returns an unordered collection.

  • Audit what a third-party webhook actually changed

    A webhook fires twice with slightly different bodies. Drop both payloads in to see whether the second is a true update or a duplicate with a new `timestamp`. The changed-count badge tells you at a glance: one changed node means a heartbeat, a dozen means real state moved.

Common pitfalls

  • Expecting a text diff. This tool ignores key order and indentation by design — if you actually want to see whitespace and line changes (for a code file, not data), use the Text Diff tool instead.

  • Leaving "Ignore array order" off for set-like arrays. A list of tags or roles in a different order shows as many changed indexes. Turn the option on when position is not meaningful, or you will chase phantom changes.

  • Pasting JSON5, comments, or trailing commas. The parser is strict JSON. A `// comment` or a trailing comma makes the side invalid; format it through the JSON Formatter first.

Privacy

Parsing and the tree diff are plain JavaScript that runs in your browser tab — neither the left nor the right JSON is uploaded, logged, or analysed. The one caveat is URL state: the left/right inputs sync to the query string so you can share a diff, which means a "Share link" carries your data into the recipient's browser history and any server access log along the way. For API keys, tokens, or unreleased payloads, copy the text summary instead of sharing the URL.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-05-29