Bandingkan JSON / Diff + Patch

Bandingkan dua dokumen JSON secara semantik di browser Anda dan ubah diff menjadi patch.

Tanpa unggahan, tanpa bolak-balik ke server. Kurangi noise dengan mode banding yang peka array, aturan path, dan toleransi numerik.

Browser-only processing, with no server upload
Array-aware modes reduce review noise
Export JSON Patch and JSON Merge Patch
Semua tetap di sesi browser Anda. Tidak ada yang diunggah.

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.

Contoh

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

Sebelum

Masukan
{
  "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
  }
}

Sesudah

Masukan
{
  "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
  }
}

Apa yang ditunjukkan contoh

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

How to compare

  1. Paste or upload the left and right JSON documents.
  2. Choose strict, ignore order, multiset, or match by key(s), then add any path rules you need.
  3. Run Compare or use the shortcut. Validate first if you only want to check parsing.
  4. Copy or download the changed paths, patch, merge patch, or report when you are done.

Yang bisa dilakukan

  • 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 per-path compare rules.
  • 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.

Aturan perbandingan dan keluaran

  • 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.
  • 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. Use Match by key(s) and list keys such as id or sku. You can also override the rule per path.

How do I ignore timestamps or request IDs?

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

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 you need them.

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-style input.

Is anything uploaded to a server?

No. Comparison, normalization, and export all happen locally in your browser.

What can I export?

JSON Patch, JSON Merge Patch, changed paths, and a Markdown report.