Skip to content
Run here 100% in your browser, no upload, no login

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.

Original document
Patch document
Merged result

How to use it

  1. Paste the original document into the left panel - the object you want to change.
  2. Paste the patch document into the right panel. Use null for any key you want removed.
  3. Click Apply patch. The merged result appears below, formatted with two-space indentation.
  4. Read the change counter: how many keys were added, removed or given a new value.
  5. Use Copy or Download to take the result back into your editor or config pipeline.

Common use cases

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.