JSON compare, diff, and patch

Compare two JSON documents semantically in your browser and turn the differences into a patch.

No upload or server round-trip. Reduce noise with array-aware modes, path rules, and numeric tolerance.

Browser-only processing, with no server upload
Array-aware modes reduce review noise
Export JSON Patch and JSON Merge Patch
Everything stays in your browser session. Nothing is uploaded.

Recommended workflow

  1. Clean or sort the JSON first with JSON Formatter or JSON Key Sorter when you want consistent input.
  2. Paste or upload the left and right JSON documents, then run Compare.
  3. Choose the array mode, match keys, tolerance, and path rules that fit the review.
  4. Review the summary, changed paths, tree, and exportable patch output.

Example

This sample shows how match keys, tolerance, and path rules narrow down reordered arrays, timestamp changes, tiny floating-point differences, and one added item.

Before

Input
{
  "orderId": "A-1001",
  "updatedAt": "2026-04-16T08:00:00Z",
  "customer": {
    "name": "Acme Corp",
    "tags": ["vip", "beta"]
  },
  "items": [
    {
      "sku": "A-1",
      "qty": 2,
      "price": 10
    },
    {
      "sku": "B-2",
      "qty": 1,
      "price": 4.5
    }
  ],
  "summary": {
    "currency": "USD",
    "total": 24.5
  }
}

After

Input
{
  "orderId": "A-1001",
  "updatedAt": "2026-04-16T08:05:00Z",
  "customer": {
    "name": "Acme Corporation",
    "tags": ["beta", "vip"]
  },
  "items": [
    {
      "sku": "B-2",
      "qty": 1,
      "price": 4.5
    },
    {
      "sku": "A-1",
      "qty": 2,
      "price": 10.0001
    },
    {
      "sku": "C-3",
      "qty": 1,
      "price": 7
    }
  ],
  "summary": {
    "currency": "USD",
    "total": 24.5001
  }
}

What this sample demonstrates

This sample shows how match keys, tolerance, and path rules narrow down reordered arrays, timestamp changes, tiny floating-point differences, and one added item.

How to compare

  1. Paste or upload the left and right JSON documents.
  2. Choose strict, ignore-order, multiset, or match-by-key mode, then add any path rules you need.
  3. Run Compare or use the shortcut. Use Validate first if you only want to check parsing.
  4. When finished, copy or download the changed paths, patch, merge patch, or report.

What you can do

  • Compare JSON semantically instead of line by line.
  • Match array items by key(s) such as id, sku, or code.
  • Ignore paths, select paths, or apply comparison rules to individual paths.
  • Use numeric tolerance to smooth over tiny floating-point differences.
  • Export JSON Patch, JSON Merge Patch, changed paths, and a Markdown report.
  • Collapse unchanged nodes and jump directly to the relevant path.

Comparison rules and output

  • Processing runs entirely in the browser. Nothing is uploaded.
  • Strict, ignore-order, multiset, and match-by-key array modes are supported.
  • Path rules support ignore, strict, ignore-order, multiset, match-keys, and tolerance modes.
  • Numeric tolerance is applied to numbers only.
  • Comments can be stripped before parse when needed.
  • Large inputs use summary-first rendering and can disable auto-compare.

FAQ

Can I compare arrays of objects by key?

Yes. Choose Match by key(s) and list keys such as id or sku. You can also override the rule for a specific path.

How do I ignore timestamps or request IDs?

Add them to Ignore paths, or use a path rule when the exception should apply to one subtree only.

Can I keep array order for some parts and ignore it for others?

Yes. Use path rules to set ignore-order, multiset, or match-keys only where needed.

Does it support JSON with comments?

Standard JSON does not allow comments. Turn on Strip comments before parse only when you need to accept JSONC input.

Is anything uploaded to a server?

No. Comparison, normalization, and export all happen locally in your browser; nothing is uploaded.

What can I export?

You can export JSON Patch, JSON Merge Patch, changed paths, and a Markdown report.