RFC 7396 is not RFC 6902
JSON Merge Patch is a document that looks like the object you want to change. It is not JSON Patch (RFC 6902), which uses an array of op, path, and value operations. This page does not apply RFC 6902 patches.
Add at least one JSON document on the left. Two or more are combined from left to right.
A store record plus a later patch for hours, tags, and manager
Documents are combined in this browser tab. Pasted JSON and local .json files stay on your computer; this page does not send them to a merge API.
Add two or more documents, choose a deep merge or JSON Merge Patch (RFC 7396), and copy the combined tree. This builds one result; it does not produce a diff.
Paste into the document slots or upload several .json files at once. Blank slots are ignored. To inspect a single tree before combining it, open the JSON viewer or tidy it in the JSON editor.
{
"store": "North",
"hours": {
"open": "09:00",
"close": "18:00"
},
"tags": ["retail"],
"manager": "Ada"
}
----- second document -----
{
"hours": {
"close": "21:00",
"timezone": "WET"
},
"tags": ["late"],
"manager": null
}Deep merge combines nested objects, overrides primitives from later documents, and concatenates arrays unless you switch arrays to replace. JSON Merge Patch (RFC 7396) treats null as a deletion and always replaces arrays. Need a difference report instead of one combined document? Use Compare JSON.
{
"store": "North",
"hours": {
"open": "09:00",
"close": "21:00",
"timezone": "WET"
},
"tags": [
"retail",
"late"
],
"manager": null
}Copy or download the pretty-printed result. If you want path keys instead of a nested tree, pass the output to Flatten JSON.
Both modes apply documents from left to right. They disagree about arrays and about null.
| Value kind | Deep merge | JSON Merge Patch (RFC 7396) |
|---|---|---|
| Nested objects | Combined recursively; later keys join the earlier object | Combined recursively; later keys join the earlier object |
| Primitive values | The later document wins | The later document wins |
| Arrays | Concatenated by default, or replaced if you choose | Always replaced, never concatenated |
| A null value | Written as null (it does not remove the key) | Deletes that key from the result |
JSON Merge Patch is a document that looks like the object you want to change. It is not JSON Patch (RFC 6902), which uses an array of op, path, and value operations. This page does not apply RFC 6902 patches.
Each additional document is applied to the result of the previous ones. The status bar shows how many non-empty inputs were used.
Documented on 2026-11-24 so a combined tree is not mistaken for a diff or a JSON Patch runner.
If any filled document is invalid JSON, the merge stops and names that document. Empty slots are ignored; broken syntax is not.
Deep merge does not match array items by an id field. With concat, later items are appended; with replace (or in Merge Patch), the later array stands in for the earlier one.
The output is one JSON value. To see what changed between two files, use Compare JSON.
Merge builds a new document. Other pages help you inspect, edit, or flatten one.
Compare JSON highlights differences instead of producing a combined object.
Open a document in the JSON viewer, or adjust it in the JSON editor before you merge.
Flatten JSON turns the combined tree into a single-level object of path keys if you need that shape next.
Questions about deep merge, JSON Merge Patch, invalid input, and how this differs from a diff
Edit, format, and beautify JSON
Validate, fix, and inspect JSON
Compare, measure, and map JSON
Convert JSON to other formats
Convert other formats to JSON
Convert, format, fix, and minify XML
Generate code and format other languages