Compare JSON

A: JSON A
B: JSON B
1
1

How to compare JSON files online – step-by-step guide

Use this online JSON compare tool to view two JSON objects side-by-side, highlight differences, and export patches or reports for version control and API testing.

  1. Step 1 – Paste or import both JSON files

    • Paste the first JSON into the left editor (JSON A) and the second into the right editor (JSON B).
    • Or use Import to load JSON from files, URLs, or clipboard for each side.
    • Use real API responses, config files, or data exports to compare meaningful changes.
  2. Step 2 – Configure comparison options

    • Enable Ignore whitespace to focus on structure rather than formatting.
    • Enable Ignore case for case-insensitive comparison of keys and string values.
    • Enable Ignore order when element order should not count as a change.
  3. Step 3 – Review the diff visualization

    • The side-by-side view highlights additions (green), deletions (red), and modifications (yellow).
    • Use the status bar to review change counts and the additions/deletions/modifications breakdown.
    • Switch between Side and Inline view modes depending on screen size or preference.
  4. Step 4 – Export results

    • Copy the summary to share changes quickly in chat, tickets, or documentation.
    • Export a Markdown report with detailed changes and statistics.
    • Export a JSON Patch (RFC 6902) to apply changes programmatically.

Quick tips for comparing JSON

  • Validate both JSON files first so syntax errors don’t hide real differences.
  • When comparing API responses, consider enabling Ignore order to avoid noise from re-ordered arrays.
  • Use JSON Patch export when you need a machine-readable diff to keep environments in sync.
Example: JSON comparison with differences
// JSON A
{
  "id": 1,
  "name": "Maeve",
  "status": "active"
}

// JSON B
{
  "id": 1,
  "name": "Maeve Winters",
  "status": "active",
  "email": "maeve@example.com"
}

// Diff Summary
- Modified: name ("Maeve" → "Maeve Winters")
- Added: email ("maeve@example.com")

Related JSON comparison & diff tools

Combine these tools with JSON comparison for validation, formatting, and code generation workflows.

Frequently Asked Questions

How does JSON comparison work?

The tool performs a structural diff to detect additions, deletions, and modifications across nested objects and arrays.

Does this upload my JSON data?

No. Everything runs locally in your browser and is never uploaded to our servers.

What comparison options are available?

You can ignore whitespace, ignore case, and ignore order to focus on meaningful structural changes rather than formatting noise.

Can I ignore whitespace?

Yes. Ignore whitespace normalizes whitespace inside string values. Whitespace outside strings is already ignored by JSON parsing.

Can I ignore case?

Yes. When Ignore case is enabled, keys and string values are compared case-insensitively to reduce false positives.

Can I ignore order?

Yes. Ignore order treats object keys and array elements as order-insensitive, which is useful when element order is not meaningful.

Why is the editor sometimes read-only?

When an ignore option is enabled, the diff switches to a normalized preview so highlighting matches the ignore rules exactly. Disable the options to edit raw JSON again.

What is JSON Patch (RFC 6902)?

JSON Patch is a standard list of operations (add, remove, replace, etc.) used to transform one JSON document into another.

How is the exported JSON Patch generated?

We compute a reliable set of operations from A → B using JSON Pointer paths. For arrays, we may use conservative replacements to avoid index drift issues.

How can I export or share results?

Use Copy Summary to copy a quick overview, Export Report to download a Markdown report, or Export JSON Patch to apply changes programmatically.

JSON Diff & Compare Tool - Side by Side Online | JSONSwiss