JSON Patch
Apply add, remove, replace, move, copy and test operations to a JSON value using RFC 6902 JSON Patch and JSON Pointer paths. The input is left unchanged and the patched document is returned locally.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
What a JSON Patch is
RFC 6902 JSON Patch is a compact list of operations — add, remove, replace, move, copy and test — that describe changes to a JSON document as data rather than as edited text. Each operation names a JSON Pointer path into the document. You paste the original document in the input and the operations in the patch option, and the tool applies them in order to return the resulting document. The original is never mutated in place.
When to reach for it
Use it when you need to describe an edit programmatically — for example a small REST API change you want to inspect before sending, or a set of updates you want to share with a colleague as a reusable patch. It is also a good way to verify a patch your code generates against a sample document before it ships, because the operations are applied and the result is shown immediately.
How paths and operations behave
A path starts with / and each segment is a property name or an array index, while /- appends to an array; ~1 escapes a slash and ~0 a tilde inside a property name. The test operation compares a value and fails the whole patch if it does not match; copy reads a value from the from path without removing it, while move removes the source and inserts it at the target. A move is rejected when the target would land inside the value being moved.
Limits worth knowing
Operations run strictly in the order listed until one fails, and a failed operation stops processing with a message naming which one. No partial result is returned on failure — you get nothing rather than a half-patched document. The indent option only controls how the successful result is pretty-printed, choosing between 2 spaces, 4 spaces, tab or a minified single line.
It never leaves this tab
Both the document and the patch are parsed and applied locally. No network requests are made, and nothing is uploaded, so you can patch a private config or a not-yet-public API shape here without it leaving your machine.
Questions
Which operations are supported?
The tool supports RFC 6902 add, remove, replace, move, copy and test. A failed operation stops processing and no partial document is returned.
What syntax do paths use?
Paths use JSON Pointer: they start with /, and ~1 escapes a slash while ~0 escapes a tilde in a property name. Use /- to append to an array.
Is my document uploaded?
No. Parsing and patching happen in your browser; no network requests are made by this tool.
Related tools
See categoryJSON Formatter & Validator
Pretty-print, minify, recursively sort keys or validate JSON, with line/column errors.
JSON Diff
Structural diff of two JSON documents, showing added, removed and changed values by path.
JSON to JSON Schema
Infer a JSON Schema (draft 2020-12) from a JSON sample, with required and additionalProperties control.
.env <-> JSON
Parse a .env file into JSON, or turn a JSON object into .env text. Runs entirely on your device.