JSON Merge Patch
Apply an RFC 7396 merge patch locally. Remove members with null, merge objects and replace arrays without rounding large numbers.
How to use
A patch object updates only the named members. Nested objects merge recursively, so changing author.email leaves author.name intact. A null member removes that key from the target.
Arrays are replaced as a whole, not concatenated or merged by index. A scalar, array or null patch replaces the entire target. To set a member to literal null, use JSON Patch instead of Merge Patch.
Behavior and limits
Use this to test an application/merge-patch+json request before sending it. The tool does not send HTTP requests or modify a remote resource. Duplicate keys and nesting beyond 64 levels are rejected.
Questions & answers
Is this RFC 6902 JSON Patch?
No. RFC 7396 uses a partial document. RFC 6902 uses an array of operations such as add, remove and replace.
Is my input uploaded?
No. Processing runs in your browser. This tool does not send your input to an API or save it in local storage. Text tools accept up to 200,000 characters.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Run standard appendix examples for merging, deletion, array replacement and root replacement.
- Comparison reference
- RFC 7396 Appendix A vectors.
- Verification scope
- These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)
-
workbench.test.js
- JSON Merge Patch passes RFC 7396 Appendix A examples
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.