JSON Diff Tool

Quickly compare two JSON objects and see exactly what changed—ideal for debugging APIs and configs.

All JSON processing happens locally in your browser. No data is uploaded or stored.

0 B
0 B

Bookmark this page to quickly compare JSON anytime.

By Muhammad Abdullah Rauf · Founder, EverydayTools.proUpdated 2026-05-03

How to use JSON Diff Tool

  1. Paste the first JSON into the left panel

    This is the 'original' or 'expected' document. It can be a full JSON object, array, or any valid JSON value.

  2. Paste the second JSON into the right panel

    This is the 'modified' or 'actual' document. The diff shows what changed from left to right.

  3. Click Compare

    The tool parses both documents and shows a colour-coded diff: green for additions, red for deletions, yellow for changed values. Unchanged lines are collapsed by default.

  4. Review the diff output

    Expand sections to see context around changes. Use the summary panel to see a count of: added keys, removed keys, and changed values.

  5. Copy or export the diff

    Copy the diff report as text or export it as a JSON patch (RFC 6902 format) showing the minimal set of operations to transform document A into document B.

Who uses JSON Diff Tool?

Common real-world scenarios where this tool saves time.

Back-end developers

Debug API response differences between versions

Compare the JSON response from two API endpoints, two API versions, or before/after a code change. Instantly see which fields changed, were added, or were removed.

DevOps and infrastructure engineers

Review configuration file changes

Compare JSON config files (package.json, tsconfig.json, AWS CloudFormation, Terraform plan outputs) between branches, environments, or deployment versions.

QA and test engineers

Compare expected vs. actual test response payloads

When an API test fails, paste the expected and actual JSON into the diff tool to see the exact discrepancy — faster than reading a raw test failure output.

JSON Diff Tool 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 in data: 4

Quickly confirms that an API response changed only in the count field and data array — a single new record was added. No other fields were touched.

Debug a config file change

Input

Left: production.json · Right: staging.json

Output

Added: debug:true · Changed: log_level 'error'→'debug' · Changed: db_host 'prod-db'→'staging-db'

Diffing environment config files reveals exactly which settings differ between environments, preventing configuration-drift bugs.

Advertisement

Frequently Asked Questions

Does key order matter in JSON diff?

In semantic mode (default), key order does not matter. {"a":1,"b":2} and {"b":2,"a":1} are considered identical. In strict mode, key order is respected and reordering counts as a change. Use semantic mode for comparing data; strict mode for comparing serialised payloads where order is significant.

What is a JSON patch (RFC 6902)?

RFC 6902 defines a JSON Patch format: an array of operations (add, remove, replace, move, copy, test) that describe how to transform one JSON document into another. Example: [{"op":"replace","path":"/count","value":6}]. JSON Patch is used in REST APIs for partial resource updates (HTTP PATCH method).

Can this tool compare nested objects and arrays?

Yes. The diff recurses into nested objects and arrays. Array comparison is done by index — a change at index 0 shows as a change at [0], not a remove+add. Enable the 'unordered array' option to compare arrays as sets (ignoring order) when element order is not significant.

What is the difference between JSON diff and JSON merge patch?

JSON diff shows what changed. JSON Merge Patch (RFC 7396) is a format for expressing updates: a Merge Patch document containing only the changed fields is applied to the original. It is simpler than JSON Patch but cannot express deletions easily (uses null for deletion). JSON diff tools can often export in either format.

Part of Developer Tools

More free tools for the same workflow.

Advertisement

Reviewed by EverydayTools Editorial Team.