Code · Made a little simpler

JSON Merge Tool

Deep-merge two JSON objects, choose how shared values and arrays combine, and download JSON that keeps the original spelling of every number.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Shared objects merge recursively. Arrays and other shared values come from Document B.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

JSON Merge Tool: how to use it

  1. Paste two JSON objects or select a local UTF-8 file for each document.
  2. Choose how to handle shared values, including whether to replace, append or combine unique array items. Shared objects merge recursively.
  3. Merge the documents, then copy the result or download merged.json.

Limits and notes

Runs on this device. Accepts two object roots, up to 4 MiB per local file and 4,194,304 characters combined. Output is capped at 4,194,304 characters. Each document supports up to 128 nested levels and 500,000 tokens. Duplicate keys inside either document are rejected.

How your privacy works →

JSON Merge Tool: common questions

Will merging round large numbers?

Each number in the output keeps its source spelling. Downstream software may still round values if it reads them as a JavaScript number.

How does the tool combine unique array items?

It keeps the first occurrence in document order. It compares object entries without regard to key order and compares nested arrays in sequence. Number spellings such as 1 and 1.0 count separately.

What happens when a property changes from an object to an array?

The selected strategy controls the whole shared value when one side is an object and the other is an array. Append arrays and Combine unique array items combine values only when both sides are arrays.

Guides