JSON Patch (RFC 6902)
Apply a JSON Patch to a document, generate a patch that transforms one JSON into another, or validate that a patch is well-formed. Supports all six RFC 6902 operations: add, remove, replace, move, copy, and test. The test operation is particularly useful — it checks that a value matches before applying the rest of the patch, enabling conditional updates.

What it does
- ▸Applies a JSON Patch (array of operations) to a JSON document
- ▸Generates a patch that transforms one JSON document into another
- ▸Validates patch structure — checks op types, paths, and required fields
- ▸Supports all RFC 6902 operations: add, remove, replace, move, copy, test
- ▸Uses JSON Pointer syntax (/path/to/field) for addressing
- ▸Reports errors with the operation index that caused the failure
Use cases
- ▸Applying a partial update to a JSON document without sending the full document
- ▸Generating a diff between two JSON states for audit logging
- ▸Validating that a patch from a client is well-formed before applying it
- ▸Testing conditional updates using the test operation
How it works
Paste your JSON document and patch (or two documents for generation mode)
Choose Apply, Generate, or Validate mode
The tool processes the operations and outputs the result
Errors show which operation failed and why
Frequently asked questions
1What is the test operation for?
The test operation checks that a value at a given path matches an expected value. If it doesn't match, the entire patch fails and no operations are applied. This enables optimistic concurrency — you can ensure a value hasn't changed before modifying it.
2How does the generate mode work?
You provide two JSON documents (original and target). The tool computes the minimal set of operations needed to transform the original into the target, outputting them as a valid JSON Patch array.
3What's JSON Pointer syntax?
JSON Pointer uses slash-separated paths like /users/0/name to address specific locations in a JSON document. It's defined in RFC 6901 and is the addressing standard for JSON Patch operations.
Related tools

JSON Diff
Structural comparison of two JSON documents — key order and formatting ignored

JSON Schema Generator
Infer a JSON Schema (draft 2020-12) from sample JSON

JSON Formatter & Validator
Format, validate, repair, and minify JSON

JSON Expand Nested Strings
Recursively parse stringified JSON values nested inside JSON objects
Use JSON Patch (RFC 6902) offline in Devinity
All 95 tools run locally on your Mac. No internet required, no data sent to servers.
Download Devinity →