Web Tools
JSON Patch Generator
Generate, apply, and validate JSON Patch (RFC 6902) documents. Diff two JSON values to produce add, remove, replace, move, copy, and test operations with RFC 6901 JSON Pointer paths. Apply patches to documents and validate patch structure. Runs entirely in your browser — your data never leaves your machine.
json patch diff rfc6902 rfc6901 api
Published May 30, 2026
All interactive tools run entirely in your browser. Your data never leaves your device.
How It Works
Paste a source and target JSON document to generate a JSON Patch that transforms the source into the target. The tool produces RFC 6902-compliant operations with RFC 6901 JSON Pointer paths.
Modes
- Generate Patch: diff two JSON documents to produce patch operations
- Apply Patch: apply a JSON Patch array to a document
- Validate Patch: check if a JSON Patch array is structurally valid per RFC 6902
Operations (RFC 6902)
- add: add a value at a path
- remove: remove a value at a path
- replace: replace a value at a path
- move: move a value from one path to another
- copy: copy a value from one path to another
- test: test that a value exists at a path
Features
- RFC 6902 compliant: standard JSON Patch format
- RFC 6901 JSON Pointer: proper path encoding with
~0and~1escaping - Recursive diff: handles deeply nested objects and arrays
- Color-coded operations: visual distinction between add (green), remove (red), replace (yellow), move/copy (blue)
- Raw JSON output: copy the full patch as JSON
- Roundtrip verification: apply generated patches to verify correctness
- 7 examples: simple changes, nested objects, arrays, multi-field updates
- Private: runs entirely in the browser — no data transmitted
Use Cases
- Generating API patch payloads for PATCH endpoints
- Understanding differences between JSON document versions
- Building and testing JSON Patch operations for REST APIs
- Validating patch documents before applying them
- Learning about RFC 6902 JSON Patch format