JSON Merge Patch
Generate and apply RFC 7386 JSON Merge Patch, display deleted fields and whole-array replacements, and show round-trip results.
Local browser processing
This page has passed the public directory check; full functionality is available after enabling JavaScript.
User Guide
How to use JSON Merge Patch
JSON Merge Patch processes input only in the current browser; nothing is uploaded, networked, or written to persistent storage.
Enter two documents
Fill in the left and right documents separately; the default example demonstrates nested objects and arrays.
Generate Patch
View the merge patch for added, modified, and deleted fields.
Apply and review
Apply the patch to the left document, then confirm whether the result is equal to the right document.
Limitations and Notes
- In JSON Merge Patch, null indicates field removal and cannot express an ordinary explicitly null addition.
- Arrays are replaced as whole values; element-by-element diffs are not provided.
- Oversized documents, dangerous prototype keys, and excessively deep structures will be rejected.
FAQ
Will arrays be merged item by item?
No; RFC 7386 replace arrays as whole values.
Will Patch modify the original text?
No, the tool calculates using a copy in the browser.
Why are round-trip not equal?
This may be caused by null deletion semantics, the input type, or a lack of expressive capability; manual review is required.