JSON Patch (RFC 6902) Generator

Turn the difference between two JSON documents into a standards-compliant JSON Patch you can replay on any server.

Differences:
0added0removed0changed

Original

Waiting for input
1

Modified

Waiting for input
1

Instant

Runs entirely in your browser — no upload, no wait.

100% private

Your JSON never leaves the tab. Nothing is logged.

No signup

Free, unlimited, no account required.

What RFC 6902 patches are for

JSON Patch is a tiny array of operations — add, remove, replace, move, copy, test — that any RFC 6902 library can apply to a JSON document. It is the standard format for PATCH requests in many REST APIs and the underlying transport for Kubernetes, RFC 7396 merge patches, and FHIR.

Generating a patch

Paste the source document on the left and the target on the right. The tool computes the smallest sequence of operations that transforms source into target, then emits them as JSON Patch. The result is copy-paste ready for fetch, axios, or curl.

// Source
{"name": "Ada", "role": "admin"}

// Target
{"name": "Ada", "role": "owner", "active": true}

// Patch
[
  {"op": "replace", "path": "/role", "value": "owner"},
  {"op": "add", "path": "/active", "value": true}
]

Patch vs merge patch (RFC 7396)

RFC 7396 merge patch is simpler — a partial JSON object overlaid on the target. It cannot remove keys (without sentinels) or operate on arrays meaningfully. RFC 6902 is more verbose but lossless. The tool can emit both formats.

Validating the patch

After generation, the tool verifies that applying the patch to the source yields the target byte-for-byte. If it does not (rare, only with custom array strategies), the validator reports the first divergence.

Privacy

Patch generation runs locally. Inputs are never uploaded.

Related tools

Frequently asked questions