Transform

JSON Merge

Combine two JSON documents into one, with the second winning wherever they disagree.

Two JSON documents

Settings

Output

Result appears here after you select

{ } How to use

  1. Paste the base document, then the one whose values should win.
  2. Choose what happens when both documents have an array at the same place.
  3. Select Process. The summary says how many existing values were overridden.

{ } How it works

JSON Merge works on the text you provide. Adjust the options, then select Process ▸ and it runs entirely in your browser — nothing is uploaded to a server — then shows the result in the Output panel.

Inputs

  • Two JSON documents — paste or type your input in the left panel (use Sample for an example)
  • When both have an array — choose one — Use the second one, Join them end to end (default: Use the second one)
  • Indentation — choose one — Minified, 2 spaces, 4 spaces (default: 2 spaces)

Output

JSON — copy it, download it, or switch the Output panel to Tree view to explore it.

{ } Common uses

  • Layer an environment’s overrides onto a base configuration.
  • Apply a partial update to a stored object without hand-editing it.
  • Combine defaults with user settings into the object your app actually reads.

{ } Limitations

  • Arrays are replaced rather than joined by default. An array in configuration is almost always a complete list, and joining turns "these three servers" into six — switch to joining when you do want that.
  • Where the two documents hold different types at the same key, the second simply wins. Nothing is merged across a type change, because there is no sensible way to combine a string with an object.

{ } FAQ

Is my data uploaded to a server?

No. Everything runs locally in your browser — your files never leave your device.

Can I process more than one file at once?

This tool works on one input at a time.

Is this tool free?

Yes — it’s completely free and needs no sign-up.

Which document wins?

The second, wherever they disagree. Objects are combined key by key at every depth, so a value the second document does not mention keeps the first document’s version rather than being dropped.

Should arrays be joined or replaced?

Replace, unless you know otherwise. Configuration arrays are lists of everything that applies — hosts, plugins, allowed origins — and joining a base list with an override list gives you both, which is rarely what an override was meant to do. Joining is right for accumulating records.