JSON Merge Patch
Apply an RFC 7396 JSON Merge Patch to a document and see exactly what changed.
Objects merge recursively, null deletes a key, arrays and scalars are replaced as a whole.
How to use it
- Paste the original document into the left panel - the object you want to change.
- Paste the patch document into the right panel. Use null for any key you want removed.
- Click Apply patch. The merged result appears below, formatted with two-space indentation.
- Read the change counter: how many keys were added, removed or given a new value.
- Use Copy or Download to take the result back into your editor or config pipeline.
Common use cases
- Previewing a PATCH request body - check what a merge patch does to a resource before sending it.
- Editing nested configuration - patch only the keys you mean to touch, deep objects merge on their own.
- Removing keys safely - a null value deletes the key, which is the whole point of RFC 7396 over plain merge.
- Teaching the difference from JSON Patch - merge patch has no operation list, so arrays are always replaced.
- Validating a patch someone sent you - the change counter shows whether it touches more than it claims.
Why it stays private
Both documents are parsed with JSON.parse in the page and merged in memory. API payloads, config files with tokens and customer records never leave your device, and no request is made while you work.
FAQ
Q: How do I delete a key? A: Set its value to null in the patch. That is the only deletion mechanism in RFC 7396 - an empty string or empty object keeps the key.
Q: Why did my array get replaced instead of merged? A: Merge patch treats arrays as scalar values. Replace the whole array in the patch, or use JSON Patch (RFC 6902) with operations if you need element-level edits.
Q: What happens when the patch key is an object but the target value is a scalar? A: The scalar is replaced by the object. Recursion only happens when both sides are objects at that key.
Q: Can the original document be an array? A: RFC 7396 defines the merge for objects. If the root is an array, the patch is applied against an empty object, so the result reflects the patch alone - start from an object to avoid surprises.
Your data stays on this device
JSON Merge Patch runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.