JSON Compare

A: JSON A
B: JSON B
1
1

Why Use JSONSwiss’s JSON Compare Tool?

  1. 1

    See added, removed, and changed values in side-by-side or inline views.

  2. 2

    Ignore optional whitespace, case, or array-order noise when that fits the comparison.

  3. 3

    Copy a summary or export a Markdown report and RFC 6902 JSON Patch locally.

JSON Compare helps answer the question that a text diff alone cannot: what changed in the data structure? It is useful for reviewing API responses, deployment configuration, snapshots, fixtures, or any pair of JSON payloads where a changed path matters more than a changed line number.

Compare JSON Online

JSON Compare reads two valid documents and matches object properties by key, so object key order does not affect the result. This lets you compare data produced by systems that serialize the same object in a different order without treating that formatting choice as a change.

Arrays are different: their order is meaningful by default. Enable Ignore order only when the array represents an unordered set in your application; otherwise, moving an item can be a real behavioral change worth seeing.

Find JSON Differences

The JSON Compare view distinguishes added values, removed values, and values that changed at the same path. Use the summary to move from a large payload to the exact nested object or array item that needs attention, rather than scanning every field manually.

For a noisy comparison, the whitespace and case options help focus on data-level differences. They should be used deliberately: ignore case is useful for case-insensitive labels, but not for identifiers or values where letter case has business meaning.

Compare API Responses and Payloads

Use JSON Compare before and after an API change to confirm which fields were added, removed, or changed. It is also useful for checking whether staging and production configurations differ in a value that should have been kept in sync.

Format each payload when a compact response is hard to review, then validate both JSON documents before treating a difference as data rather than a parse error. If either input is malformed, repair malformed JSON first.

JSON Compare Options and Exports

JSON Compare can ignore whitespace, case, or array order according to the comparison you need. The result can stay as a quick visual review, be copied as a summary, or be exported as a Markdown report or an RFC 6902 JSON Patch for a review record or follow-up automation.

These options change how the comparison is interpreted; they do not edit either source document. Keep the default settings when exact text and array position are part of the behavior you are checking.

JSON Compare Examples

Reference demo

See changed values and an added field

Compare two versions of the same order payload to isolate the values that changed and the new field that was added.

JSON A
1
{
2
"id": "ord_204",
3
"status": "pending",
4
"items": 1
5
}
JSON B
1
{
2
"id": "ord_204",
3
"status": "paid",
4
"items": 2,
5
"receipt": true
6
}

The comparison highlights the changed status and item count, plus the added receipt field. Object-key order does not affect the result; array order does unless Ignore order is enabled.

Reference demo

Ignore object-key order by default

Two systems can serialize the same object in a different key order. JSON Compare matches object properties by key instead of treating that presentation change as a data difference.

JSON A
1
{
2
"environment": "staging",
3
"retries": 3
4
}
JSON B
1
{
2
"retries": 3,
3
"environment": "staging"
4
}

Result: no data differences. Object-key order is ignored automatically, with no comparison option required.

Reference demo

Keep array order when sequence matters

Array positions are meaningful by default, so a reordered deployment sequence is still reported as a difference.

JSON A
1
{
2
"steps": ["validate", "format", "deploy"]
3
}
JSON B
1
{
2
"steps": ["format", "validate", "deploy"]
3
}

Default result: changed array positions. Enable Ignore order only when the array represents an unordered set.

How to Compare JSON

  1. 1Paste or import JSON A and JSON B.
  2. 2Choose comparison options such as Ignore whitespace, Ignore case, or Ignore order.
  3. 3Review the changed paths and export the summary, Markdown report, or JSON Patch if useful.

Related JSON Tools

Frequently Asked Questions

How do I compare JSON online?

Paste or import JSON A and JSON B, then review the structural diff. The tool detects additions, removals, and changed values in objects, arrays, and nested fields instead of comparing raw characters alone.

Is my JSON uploaded anywhere?

No. Comparison, normalized preview, summary generation, Markdown report export, and JSON Patch export all run locally in your browser.

Does JSON object key order matter when comparing?

No. Object keys are compared by their names and values, not their display order. Array order matters by default because positions can carry meaning.

What does Ignore order do?

Ignore order compares arrays without treating a different item position as a change. Use it only when array order is not meaningful, such as tags or permissions; leave it off for timelines, rankings, and ordered workflows.

Why does the editor become read-only when ignore options are enabled?

Because the page switches to a normalized preview rather than showing the raw source exactly as typed. Read-only mode prevents confusion and keeps the diff highlights aligned with the comparison rules you enabled.

What is JSON Patch and why would I export it?

JSON Patch is a standard set of add, remove, replace, and related operations that transform one JSON document into another. It is useful for environment sync, automated change application, and API test workflows.

Should I validate or format the JSON before comparing it?

Validation first is recommended. If one side is invalid JSON, the diff is less trustworthy. Formatting can also help readability, especially before comparing large payloads.

What kinds of workflows is this compare page best for?

It works especially well for API version comparisons, environment config drift checks, data migration review, release verification, and debugging differences between two recorded responses.

When should I use the Markdown report?

Use the Markdown report when you need to paste a readable diff summary into tickets, release notes, QA records, or code review discussions.

How should I compare very large JSON payloads?

Validate first, then compare only the relevant sections when possible. If the payload contains a lot of order or formatting noise, use the ignore options selectively so the important structural changes stand out.