Neatbo.

JSON Merge Patch

Apply an RFC 7396 merge patch locally: update object fields, delete fields with null and replace arrays as whole values.

Browser-local processingInputOriginal and Merge Patch JSONOutputPatched JSON documentTwo UTF-8 JSON documents, up to 1 MiB each
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.

⌘ / Ctrl + Enter to run

Apply a JSON Merge Patch

The original is changed only in the preview. A null patch member deletes that key; an array patch replaces the whole array.

Paste or import the original JSON and a Merge Patch document.

Preparing the tool…

Before you start

Preview an RFC 7396 Merge Patch on a JSON document, then download the complete result. Import or paste the original and patch separately.

How to use this tool

  1. Paste or import the original JSON and the Merge Patch JSON separately.
  2. Object members set to null are deleted; arrays and other nonobject values replace the target.
  3. Review deleted keys, whole-array replacements and the complete result before downloading. Use JSON Patch for indexed array edits.

Supported inputs and limits

A null patch member deletes an existing object key. Existing arrays are replaced as whole values; an array element cannot be patched by ID. A nonobject patch replaces the entire document.

Each UTF-8 JSON input is limited to 1 MiB. The page lists up to 20 deletion and array-replacement paths of each kind; the downloaded result contains the full JSON. No HTTP PATCH request is sent.

Worked example

Example input

{"name":"Ada","note":"old","roles":["read"]}

Merge Patch JSON:
{"note":null,"roles":["write"]}
Example options
{}

Example output

{
  "name": "Ada",
  "roles": [
    "write"
  ]
}

When something does not work

Correct either JSON document's syntax or duplicate keys, and keep each UTF-8 input under 1 MiB. Check the complete result before saving.

Frequently asked questions

How are null values and arrays handled?

A null patch member deletes an existing object key. An array patch replaces the entire array; a nonobject root patch replaces the whole document.

What should the example produce?

name remains Ada, note disappears and roles becomes ["write"]. Retain the original document for rollback.

Which cases are outside its scope?

Merge Patch cannot target one array element by index or ID, and it does not send an HTTP request. Use JSON Patch for indexed edits.

Documentation & further reading

Related tools