Generate JSON merge patch

Client

Produce merge patches for partial updates.

Learn more: Generate JSON merge patch

Compare a base JSON document with a target and generate an RFC 7396 JSON Merge Patch for partial-update APIs, configuration changes, and reviewable fixtures.

Required input

Provide base and target values using the page example. The result contains only the object members needed to transform the base into the target; null represents member removal.

What the result means

JSON Merge Patch replaces arrays as whole values and uses null as a delete instruction, so it cannot express setting an object member to JSON null without ambiguity. Use JSON Patch for operation-level array edits.

Local processing

The page parses and transforms the pasted document in your browser. Use a smaller representative sample first when the source is large.

What this page does

Compare a base JSON document with a target and generate an RFC 7396 JSON Merge Patch for partial-update APIs, configuration changes, and reviewable fixtures.

Input and workflow

Provide base and target values using the page example. The result contains only the object members needed to transform the base into the target; null represents member removal. Start with Load example or prefill the primary input with ?q= / ?qb=.

Scope and limits

JSON Merge Patch replaces arrays as whole values and uses null as a delete instruction, so it cannot express setting an object member to JSON null without ambiguity. Use JSON Patch for operation-level array edits.

The operation runs in your browser. Large documents may slow the tab, so test a representative sample before processing more data.

Loading…

Nearby workflows on Toolcore

  • JSON Merge Patch — RFC 7396 merge patch against a base document—recursive merge, null removes keys.
  • JSON Pointer & Patch — RFC 6901 pointers, apply RFC 6902 patches, generate diff patches—client-side.
  • JSON compare — Side-by-side diff paths; sample pre-filled.
  • JSON diff ignore keys — Skip volatile fields like ids or timestamps—browser.

Common use cases

  • Create a compact PATCH request body from before-and-after JSON objects.
  • Review configuration changes without sending an entire replacement document.
  • Generate RFC 7396 fixtures for API and contract tests.

Common mistakes to avoid

  • Reading null as a normal replacement value

    In an RFC 7396 merge patch, null removes the named member from the target object.

  • Expecting array item operations

    Merge Patch replaces an array as a whole. Use JSON Patch when indexes and individual operations matter.

  • Swapping base and target

    The generated patch transforms base into target; reversing them creates the inverse change.

FAQ

What is JSON Merge Patch?

RFC 7396 defines an object-shaped patch where supplied values replace members and null removes members.

How is it different from JSON Patch?

JSON Patch is an ordered operation list; Merge Patch is a partial document and is simpler for object updates.

Are the documents uploaded?

No. Patch generation runs locally in your browser.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • json merge patch generator
  • rfc 7396 patch online
  • generate merge patch from two json documents
  • json partial update body generator

Related utilities you can open in another tab—mostly client-side.