JSON Merge Patch
Apply an RFC 7396 merge patch locally: update object fields, delete fields with null and replace arrays as whole values.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Preview an RFC 7396 Merge Patch on a JSON document, then download the complete result. Import or paste the original and patch separately.
How to use this tool
- Paste or import the original JSON and the Merge Patch JSON separately.
- Object members set to null are deleted; arrays and other nonobject values replace the target.
- Review deleted keys, whole-array replacements and the complete result before downloading. Use JSON Patch for indexed array edits.
Supported inputs and limits
A null patch member deletes an existing object key. Existing arrays are replaced as whole values; an array element cannot be patched by ID. A nonobject patch replaces the entire document.
Each UTF-8 JSON input is limited to 1 MiB. The page lists up to 20 deletion and array-replacement paths of each kind; the downloaded result contains the full JSON. No HTTP PATCH request is sent.
Worked example
Example input
{"name":"Ada","note":"old","roles":["read"]}
Merge Patch JSON:
{"note":null,"roles":["write"]}Example options
{}Example output
{
"name": "Ada",
"roles": [
"write"
]
}When something does not work
Correct either JSON document's syntax or duplicate keys, and keep each UTF-8 input under 1 MiB. Check the complete result before saving.
Frequently asked questions
How are null values and arrays handled?
A null patch member deletes an existing object key. An array patch replaces the entire array; a nonobject root patch replaces the whole document.
What should the example produce?
name remains Ada, note disappears and roles becomes ["write"]. Retain the original document for rollback.
Which cases are outside its scope?
Merge Patch cannot target one array element by index or ID, and it does not send an HTTP request. Use JSON Patch for indexed edits.
Documentation & further reading
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
Compare text
See what changed, side by side.
HTML formatter
Format HTML indentation so its structure is easier to read.