JSON Patch & JSON Pointer
Apply RFC 6902 JSON Patch operations to a document, or resolve RFC 6901 JSON Pointer expressions. Browser-side, no data sent to servers.
{
"user": {
"name": "Bob",
"age": 30,
"roles": [
"admin",
"editor",
"viewer"
]
},
"settings": {
"theme": "light",
"language": "en"
}
}What Is the JSON Patch & JSON Pointer Tool?
The JSON Patch tool implements two IETF standards for working with JSON data. JSON Patch mode (RFC 6902) lets you apply a sequence of patch operations — add, remove, replace, move, copy, and test — to any JSON document and see the result instantly. JSON Pointer mode (RFC 6901) lets you type a path expression like /user/address/city and resolve the exact value at that location in the document.
Both standards are widely used in REST APIs. PATCH endpoints commonly accept RFC 6902 arrays, and JSON Pointer is the path syntax used inside JSON Patch, JSON Schema, and OpenAPI documents.
How to Use the JSON Patch Tool
- Select JSON Patch or JSON Pointer mode using the tabs.
- Click Load Sample to populate both panels with example data.
- Paste your JSON document into the left panel.
- In Patch mode: enter a valid RFC 6902 patch array on the right. The operations summary shows each op, path, and value.
- In Pointer mode: type a JSON Pointer string (e.g.
/user/roles/0) to resolve a value. - The result appears in the output panel. Click Copy to copy it.
Features
- JSON Patch (RFC 6902): add, remove, replace, move, copy, test operations
- JSON Pointer (RFC 6901): resolve any path inside a JSON document
- Operations preview panel with colour-coded op badges
- Supports
-token for appending to arrays - Handles
~0and~1escape sequences in pointers - Clear error messages for invalid JSON or failed operations
- Runs entirely in your browser — no data sent to servers
FAQ
What is JSON Patch (RFC 6902)?
JSON Patch (RFC 6902) is a format for describing changes to a JSON document as an array of operation objects. Each operation has an op field (add, remove, replace, move, copy, or test), a path field (a JSON Pointer), and optional value or from fields. It is more expressive than JSON Merge Patch and supports atomic patch application.
What is a JSON Pointer (RFC 6901)?
A JSON Pointer (RFC 6901) is a string syntax for identifying a specific value within a JSON document. Pointers start with / and use / to separate keys. For example, /user/name points to the name key inside the user object. Use ~0 to escape ~ and ~1 to escape /.
What is the difference between JSON Patch and JSON Merge Patch?
JSON Patch (RFC 6902) uses an array of typed operations and supports adding to arrays by index, moving and copying values, and atomic test-then-modify workflows. JSON Merge Patch (RFC 7396) is simpler — it merges two objects and uses null to delete keys — but cannot target array elements by index or express moves.
How do I append to an array using JSON Patch?
Use the special "-" token at the end of the path: { "op": "add", "path": "/myArray/-", "value": "newItem" }. The "-" character always refers to the position after the last element, effectively appending to the array.