JSON deep merge
ClientCombine a base document with an overlay—nested objects merge key by key; lists and scalars from the overlay replace the base value. Use URL params left / right for agent prefill.
Learn more: deep merge
Combine two JSON objects so nested objects merge per key; the right document is the overlay.
Arrays
If either side has an array at the same key, the right-hand array replaces the left entirely—this is not a zip or union merge.
Deep merge
?
The right-hand document overlays the left. Nested objects merge recursively; arrays and primitives from the right replace the left value entirely.
Common use cases
- Layer environment-specific overrides on a shared defaults object without hand-copying nested keys.
- Preview how two config drafts combine before merging in code or CI.
- Compare merge results with JSON Merge Patch or JSON Patch workflows when choosing an update strategy.
Common mistakes to avoid
Expecting arrays to concatenate
This deep merge replaces the entire array when the overlay provides one. Use list-specific logic if you need append/merge-by-id behavior.
Confusing deep merge with JSON Merge Patch (RFC 7396)
Merge Patch has null semantics and different rules. If your API speaks RFC 7396, use the Merge Patch page instead.
FAQ
Is merging performed locally?
Yes. Both documents are merged in your browser; nothing is uploaded.
Which side wins on conflicts?
The right (overlay) document wins for scalars and arrays. Nested objects are merged recursively until a leaf value replaces the base.
More tools
Related utilities you can open in another tab—mostly client-side.
JSON Merge Patch
ClientRFC 7396 merge patch against a base document—recursive merge, null removes keys.
JSON compare
ClientSide-by-side diff paths; sample pre-filled.
JSON formatter
ClientJSON format online: pretty-print, minify, validate, escape, download .json.
JSON Pointer & Patch
ClientRFC 6901 pointers, apply RFC 6902 patches, generate diff patches—client-side.