JSON deep merge

Client

Combine 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.

Nearby workflows on Toolcore

  • JSON formatterwhen the document must parse before any transform or export.
  • Compare JSONafter two revisions should be diffed structurally.
  • JSON Merge Patchfor shallow merge semantics beside deep merge.

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.
  • Sanity-check inherited defaults plus a small delta before pasting into infra-as-code or app config loaders.

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.

  • Assuming null clears a key like some APIs do

    Here, a null in the overlay replaces the value with null—it does not delete the key. Deletion semantics belong to Merge Patch or your application layer.

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.

Does key order in the output matter?

JSON objects are unordered; this tool emits a consistent merge result for inspection. Do not rely on key order as a contract—use arrays when sequence matters.

Common search terms

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

  • json deep merge online
  • merge json objects deeply

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