Skip to content
100% local

JSON Patch applier

Apply an RFC 6902 JSON Patch (or RFC 7396 merge patch) to a JSON document.

Input
Patch (JSON)
Output

JSON Patch applier

Paste a JSON document and a patch, and this tool applies the patch and returns the resulting document. It supports both RFC 6902 JSON Patch — the standard array of add, remove, replace, move, copy and test operations — and RFC 7396 JSON Merge Patch, the simpler "just describe the shape you want" format used by many REST APIs for PATCH requests.

Before anything runs, the patch is checked for structural problems: an unknown operation name, a missing or malformed "path", a missing "value" on add/replace/test, or a missing "from" on move/copy all get caught up front and reported with the exact operation index, rather than failing halfway through. Once a patch passes that check, the on-error option decides what happens if an individual operation still fails at apply time (a path that no longer exists, a test that doesn't match): stop at the first failure and keep whatever already applied, or skip it and keep going. Turn on the step-by-step trace to see the document after every single operation — invaluable when a nine-step patch does something unexpected on step six. Dry run computes the whole thing without changing the output, so you can check a patch is safe before trusting it.

JSON Pointer paths follow RFC 6901 exactly, including the "-" array-append token and the ~0 / ~1 escapes for "~" and "/" inside a key. Move and copy read the source with "from" and write with "path"; test compares structurally, ignoring object key order. Output can be indented for readability or compacted for pasting back into an API call, and the tally reports how many operations applied, failed or were skipped.

Everything runs locally in your browser — the document and the patch are never uploaded anywhere, so it's safe to use with real API payloads or configuration files. Copy the result, download it as a .txt file, or send it straight back into the input to apply another patch on top.

FAQ

What's the difference between JSON Patch and JSON Merge Patch?
JSON Patch (RFC 6902) is an explicit list of operations — add this, remove that, move this here — so it can express precise changes like reordering an array. JSON Merge Patch (RFC 7396) is just a partial JSON object describing the new shape; a key set to null deletes it, anything else overwrites it. Merge patch is simpler to write by hand but can't express array edits or "delete this key" versus "set it to null" unambiguously.
What happens if an operation fails partway through?
With "stop at first error", operations already applied stay applied and the rest are skipped — the tally and trace show exactly where it stopped. With "skip and continue", every operation is attempted and only the failing ones are left out of the result.
What does dry run actually do?
Dry run validates the patch and simulates every operation, so the tally and trace show exactly what would happen, but the output box still shows your original, untouched document. Nothing is "written" anywhere in a browser tool — it's a way to preview a patch's effect before you rely on it.
Does it validate the patch before applying it?
Yes. An unknown operation name, a path that isn't a valid JSON Pointer, or a missing "value"/"from" field are all caught before any operation runs, and the error names the operation index so you can find it in a long patch.
Is my JSON uploaded anywhere?
No. Both the document and the patch are processed entirely in your browser and never leave your device.