JSON Patch is an IETF standard (RFC 6902) format for expressing a sequence of atomic operations to modify a target JSON document.
JSON Patch (RFC 6902) defines a JSON document structure for describing changes to apply to a target JSON document. Used in HTTP PATCH API endpoints, Kubernetes mutating admission webhooks, and state replication engines, JSON Patch provides fine-grained, atomic mutations.
Compare documents and generate unified diffs using the Diff Viewer or format payloads in the JSON Formatter.
| Op | Description | Example Operation Object |
|---|---|---|
add |
Adds a value to an object or inserts into array | { "op": "add", "path": "/users/0", "value": "Alice" } |
remove |
Removes a property or array item | { "op": "remove", "path": "/draft" } |
replace |
Replaces an existing value | { "op": "replace", "path": "/role", "value": "admin" } |
move |
Moves a property to a new path | { "op": "move", "from": "/oldKey", "path": "/newKey" } |
copy |
Duplicates a property to another path | { "op": "copy", "from": "/billing", "path": "/shipping" } |
test |
Asserts that a value exists before patching | { "op": "test", "path": "/version", "value": 4 } |
Free, browser-based utilities to test, generate, and inspect JSON Patch (RFC 6902) Document Updates payloads directly.
Compare two text blocks and highlight exactly what changed.
Prettify, minify, and validate JSON data instantly.
Repair and fix malformed JSON data from AI outputs, API responses, and copy-paste.
Generate TypeScript interfaces, Zod schemas, and Valibot schemas from JSON.