Diff runs in a Web Worker in your browser. Object keys are unordered; arrays default to index order unless you ignore order or match by key. Exports RFC 6902 JSON Patch and RFC 7396 merge patch. Not a certified merge tool for conflicting edits.

Skip to JSON diff tool

JSON Diff Tool

Paste two JSON payloads and see exactly what changed—tree or side-by-side views, ignore paths, array options, and JSON Patch export. Ideal for API regression and config reviews.

Example: API profile change

Comparing Alice's profile versions highlights 3 modified paths (/age, /address/city, /address/zip), 2 added (/email, /tags/2), and optional ignore for noisy /updatedAt timestamps.

Paste left/right JSON in the tool below— structural diff runs in your browser (Web Worker). Export RFC 6902 JSON Patch or RFC 7396 merge patch. Validate syntax first with the JSON Validator or format with the JSON Formatter.

JSON Diff — compare two JSON documents with structural diff in your browser. Payloads are not uploaded to our servers.

Object keys are unordered by default. Arrays compare by index unless you ignore order or match by key. Patch export uses RFC 6902; merge patch uses RFC 7396.

0 B
0 B
By Muhammad Abdullah Rauf · Founder, EverydayTools.proUpdated 2026-07-10· Reviewed by EverydayTools Editorial Team

What is a JSON diff tool?

A JSON diff tool compares two JSON documents structurally and highlights added, removed, and changed values—ignoring whitespace and (by default) object key order—so you can debug API responses and configs without noisy text diffs.

A JSON diff tool compares two JSON documents and reports exactly where they differ: added keys, removed keys, changed values, and nested structural changes. Unlike a plain text diff, it parses both inputs first, so formatting differences (whitespace, indentation) do not count as changes. Object keys are unordered in JSON, so reordering keys alone is not treated as a difference.

This EverydayTools page runs the comparison in your browser (Web Worker). You can ignore noisy paths (timestamps, ids), treat arrays as unordered sets, match array objects by a key such as id, and export RFC 6902 JSON Patch or RFC 7396 JSON Merge Patch.

Quick answers

Concise answers for common searches — definitions, steps, and comparisons.

What does the JSON Diff tool do?

Structurally compares two JSON documents and highlights added, removed, and changed paths. Export RFC 6902 JSON Patch or merge patch—all in your browser.

Is JSON Diff private?

Yes—diff runs locally in your browser. Payloads are not uploaded to EverydayTools servers.

How to use Compare JSON online with structural diff and patch export

  1. Paste the first JSON into the left panel

    This is the original or expected document—any valid JSON object, array, or value. Use Format left if the payload is minified.

  2. Paste the second JSON into the right panel

    This is the modified or actual document. Optionally enable Sort keys, Ignore array order, or Ignore paths for timestamps.

  3. Compare (auto or manual)

    Diff updates as you type when Auto is on. For large files, Auto turns off—click Compare or press Ctrl+Enter. Results show tree or side-by-side views with added/removed/modified counts.

  4. Review and export

    Copy the summary, RFC 6902 JSON Patch, merge patch, or Markdown. Download patch or Markdown files for PRs and API PATCH bodies.

Who uses Compare JSON online with structural diff and patch export?

Common real-world scenarios where this tool saves time.

Back-end developers

Debug API response differences between versions

Compare JSON from two endpoints, API versions, or before/after a deploy. See which fields changed, were added, or were removed.

DevOps and infrastructure engineers

Review configuration file changes

Compare package.json, tsconfig, CloudFormation, or Terraform JSON outputs between branches and environments.

QA and test engineers

Compare expected vs actual test payloads

When an API test fails, paste expected and actual JSON to see the exact discrepancy faster than reading raw assertion output.

Workflow guides

Step-by-step chains that connect related tools for common tasks.

API regression check

Compare staging vs production (or before/after) response bodies.

  1. Capture both JSON responses (or paste from logs).
  2. Optionally ignore volatile paths such as /updatedAt or /requestId.
  3. Click Compare and review added/removed/modified counts.
  4. If syntax fails, fix with the JSON Validator first, then re-diff.

Config drift between environments

Find which settings differ between production and staging JSON configs.

  1. Paste production JSON on the left and staging on the right.
  2. Enable Sort keys if key order differs between exporters.
  3. Export Markdown or JSON Patch for the change ticket.
  4. Need a schema for the payload? Use the JSON Schema Generator .

Compare JSON online with structural diff and patch export examples

Compare API response versions

Input

Left: { "status": "ok", "count": 5, "data": [1,2,3] } · Right: { "status": "ok", "count": 6, "data": [1,2,3,4] }

Output

Changed: /count 5→6 · Added: /data/3 → 4

Confirms the API response changed only in count and one new data element—no other fields were touched.

Debug a config file change

Input

Left: production.json · Right: staging.json (ignore /updatedAt)

Output

Added: /debug true · Changed: /log_level · Changed: /db_host

Diffing environment configs reveals drift. Ignoring /updatedAt removes timestamp noise so you focus on real settings.

Reference tables

Structural JSON diff vs text diff

Why developers use a JSON-aware compare instead of git diff on raw files.

AspectStructural JSON diffPlain text diff
Whitespace / indentationIgnored after parseCounts as changes
Object key orderIrrelevant (unordered)Often flagged as churn
OutputPaths + patch opsLine hunks
Best forAPI payloads, configsSource code, prose

Use Text Diff (/text-diff) when you need line-oriented comparison of non-JSON text.

JSON Patch vs JSON Merge Patch

Choosing an export format for updates.

AspectRFC 6902 JSON PatchRFC 7396 Merge Patch
FormOps array (add/remove/replace…)Partial JSON document
Deletesremove opnull value
Array editsPath-preciseLimited / replace-heavy
Common useHTTP PATCH, toolingSimple partial updates

Frequently Asked Questions

Does key order matter in JSON diff?

No for objects—JSON object keys are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are treated as identical. Enable Sort keys if you want a stable key order before comparing. Arrays are ordered by default (index-based); use Ignore array order or Match-by-key when order is not meaningful.

What is a JSON patch (RFC 6902)?

RFC 6902 defines a JSON Patch: an array of operations (add, remove, replace, move, copy, test) that transform one document into another. Example: [{"op":"replace","path":"/count","value":6}]. Use Copy patch to export ops for HTTP PATCH or libraries like fast-json-patch.

Can this tool compare nested objects and arrays?

Yes. The diff recurses into nested objects and arrays. Arrays compare by index by default. Enable Ignore array order to treat arrays as sets, or Match array items by key (e.g. id) when objects have stable identifiers.

What is the difference between JSON Patch and JSON Merge Patch?

JSON Patch (RFC 6902) is an explicit ops list. JSON Merge Patch (RFC 7396) is a partial document: changed fields are set, missing keys mean no change, and null deletes a key. This tool can export both.

Is JSON Diff private?

Yes. Comparison runs in your browser. Inputs are not uploaded to EverydayTools servers. Share links store settings only, not your JSON payloads.

What does the JSON Diff tool do?

It structurally compares two JSON documents, highlights added/removed/changed paths, and exports JSON Patch, merge patch, or Markdown—ideal for API regression checks and config reviews.

Privacy, accuracy, and trust

Privacy

JSON Diff keeps inputs on your device. Comparison runs in your browser (Web Worker). Share links encode settings only—not payloads.

Array match-by-key and unordered modes are best-effort for review—not a substitute for domain-specific reconciliation. Validate patch consumers against your library (e.g. fast-json-patch).

Advertisement

Reviewed by EverydayTools Editorial Team on 2026-07-10.

Same workflow or intent — pick the next step without leaving the site.

Frequently opened tools from the same category.

Continue learning

Guides and walkthroughs that reference this tool.

Explore categories

Browse full tool collections by topic.