All tools

Merge JSON

JSON

Deep merge two JSON objects: choose deep merge, shallow, or replace-arrays strategy. Shows conflicts.

Combining two config objects sounds simple until arrays and nested keys are involved, and this handles three strategies: deep merge recurses into nested objects with the second object's values winning on conflict, shallow merge only combines top-level keys, and replace-arrays treats array values (like a plugin list) as atomic and swaps them wholesale rather than concatenating or index-merging, since that's rarely what you actually want for config files. Every conflicting key gets surfaced explicitly rather than silently overwritten, which is the main value here over hand-merging with a spread operator. It's built for two objects at a time in the UI. For merging many objects in sequence, the REST API or SDK lets you chain merge calls in a script instead.

jsonmergedeepcombineobjectsoverride

How to use Merge JSON

  • 1.Paste two JSON objects and pick deep merge to combine them recursively, with the second object's values winning on conflicts.
  • 2.Use shallow merge when you only want top-level keys combined, without recursing into nested objects.
  • 3.Switch to replace-arrays mode when merging config objects where array values (like a list of plugins) should be replaced wholesale rather than concatenated.

Frequently asked questions

Does this run in my browser or on a server?
Merging runs entirely client-side — neither JSON object is uploaded.
Which value wins when both objects have the same key?
The second object's value wins by default; the tool highlights every such conflict so you can review it rather than silently losing data.
How are arrays merged in "deep merge" mode?
By default arrays are treated as atomic values and replaced rather than element-wise merged, since concatenating or index-merging arrays is rarely what you actually want for config files.
Can I merge more than two objects at once?
The UI is built for two objects at a time; for merging many objects, use the REST API or SDK and chain merge calls in a script.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/merge-json \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"base":{"name":"Alice","prefs":{"theme":"dark"}},"override":{"age":30,"prefs":{"lang":"en"}},"strategy":"deep"}'

Get an API key from your dashboard · Full API docs →