Deep Merge JSON Tool
Paste the base and overlay documents, pick the array strategy and the scalar conflict rule, then read the merged JSON and the operation log.
Runs locally in your browser
Paste the base and overlay documents, pick the array strategy and the scalar conflict rule, then read the merged JSON and the operation log.
Runs locally in your browser
The tool merges an overlay JSON document into a base document and writes the result as pretty-printed JSON. Objects are merged key by key, recursively: a key that only the overlay has is added, and a key that both documents share is resolved by the scalar conflict rule — use the overlay value, keep the base value, or stop with an error that names the path.
Arrays follow the strategy you choose: replace (the overlay array wins), concatenate (base items followed by overlay items), concatenate unique (the same without repeated values) or merge objects by key (items with the same value in the key field are merged, new items are appended). Everything runs in the browser, and every change is listed path by path under Merge operations.
Objects are merged recursively and own keys are matched by name: a key that exists only in the overlay is added and logged as an add operation. Names such as __proto__, constructor and prototype are rejected on the overlay side, so a crafted document cannot reach the object prototype. Two different scalar values are settled by the rule you selected — the overlay value, the base value, or an error such as Merge conflict at $.service.retries.
Values of different types are not converted: a number under a key in one document and an array under the same key in the other count as a conflict and follow the same rule. Identical values are left untouched and produce no log entry, and two identical documents end with the single entry $: no changes.
Replace array keeps the overlay array exactly as it is, even when the base array was longer. Concatenate arrays appends the overlay items after the base items without removing repeats, and Concatenate unique values drops repeated items by comparing their JSON representation, so ["a","b"] plus ["c","a"] becomes ["a","b","c"].
Merge objects by key matches items by the value of the key field: an overlay item with {id: 1} merges into the base item with id 1 instead of being appended, and the match compares the key as text, so 1 and "1" are the same identifier. Items without that key, and items that are not objects, are appended untouched. The key name is trimmed, so a leading or trailing space in the field is ignored.
The result is plain JSON in the order the merge produced: base keys first, overlay additions after them. The operation log is the fastest way to audit a merge — every entry names the path it changed, and keyed array entries use the id form $.users[id=1].role. Copy puts the merged document on the clipboard and Download saves it as voritools-merged.json.
The merge runs entirely in the browser, with no upload and no network request, so the tool is safe for internal configuration and test fixtures. It does not resolve conflicts on its own and does not convert types; when a merge is ambiguous it obeys the rule you picked and records what it did.