Create or apply an RFC 7386 JSON Merge Patch, the format of HTTP PATCH bodies
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 17 Oct 2026.A JSON Merge Patch looks like the document itself: send only the keys that change, and null for a key to delete. Many REST APIs and kubectl patch --type merge use it. Paste the original and the changed document to get the smallest merge patch, or switch to Apply to merge one in. Where the changed document holds a null, the page warns, because a merge patch cannot set null.
Paste or type your input.
Choose the options you need.
Press Ctrl+Enter, then copy or download.
REST APIs use PATCH requests to change part of a resource without resending all of it. The body is usually one of two standard formats, and getting either one exactly right by hand is fiddly. This page writes them for you and tests them before they reach a server.
| Mode | You paste | You get |
|---|---|---|
| Create patch | Original and changed document | An RFC 6902 JSON Patch |
| Apply patch | Original and a JSON Patch | The patched document, or the failing operation |
| Create merge patch | Original and changed document | An RFC 7386 merge patch |
| Apply merge patch | Original and a merge patch | The merged document |
How it was checked. Every record of the json-patch-tests suite that the suite enables, the 15 cases of RFC 7386 Appendix A and the RFC 6901 pointer examples pass, and 400 random edits round-trip exactly. Nothing you paste leaves your browser. To compare two documents as readable text instead, use JSON Diff.
The rest of the article, and all 6 questions about JSON Patch Generator and Tester, are on the JSON Patch Generator and Tester page.
JSON Patch (RFC 6902) is a list of operations such as add, remove and replace, each with a path, so it can change array items and set values to null. JSON Merge Patch (RFC 7386) is a partial document: keys to change, null for keys to delete. Merge patches are simpler; JSON Patch is more precise.
Paste the original document on the left and the changed one on the right with Create patch selected. The page compares them key by key, matches array items by their longest common run, and writes the add, remove and replace operations. Applying the result to the original gives the changed document exactly.
Write ~1 for a slash and ~0 for a tilde, as RFC 6901 defines. The key a/b becomes the path /a~1b, and m~n becomes /m~0n. The generator escapes keys this way automatically, so a created patch always uses valid pointers.
No. Comparing documents, creating the patch and applying it all happen in your browser, and nothing is uploaded or stored. The implementation passes the shared json-patch-tests suite and the 15 merge patch cases from RFC 7386 Appendix A.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about JSON Patch Generator and Tester and anybody who knows can answer. No account needed.
Same job, other tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON · JSON to YAML – Turn JSON into clean, readable YAML for configs · Query String Parser – Split a URL query string into a table of decoded parameters.