π JSON Merge Patch Tool
Online RFC 7396 JSON Merge Patch - Declarative merge, null deletes fields, pure frontend
π Source JSON Document
π Merge Patch Document
β Merged Result
FAQ
Q1: What's the difference between JSON Merge Patch and JSON Patch?
JSON Merge Patch (RFC 7396) is declarative β it describes the desired final state, with null meaning "delete this field". JSON Patch (RFC 6902) is operational β it describes a sequence of operations (add/remove/replace). Merge Patch is simpler and more intuitive, but doesn't support precise array element operations.
Q2: How do I delete a field?
Set the target field to null in the Merge Patch document. For example, {"city": null} will delete the city field from the source document. If the field doesn't exist in the source, null has no effect.
Q3: How are arrays handled?
Merge Patch replaces arrays entirely β it doesn't support partial array modifications. If the patch contains an array, it completely replaces the corresponding array in the source. For precise array element operations, use JSON Patch (RFC 6902) instead.