JSON-Utils

JSON Merge

Deep merge an override document into a base document. Objects merge key by key, scalar conflicts resolve in favor of the override, and arrays either replace wholesale or concatenate, your choice. A good fit for layered configuration and test fixtures.

Base JSON
Override JSON
Merged
Result will appear here
Ready. Press Merge or Ctrl+Enter.

How to use the JSON Merge

  1. Paste the base JSON on the left and the override on the right.
  2. Pick an array strategy: replace or concatenate.
  3. Press Merge and copy the combined document.

Example

Try overriding the version and adding a license key in the right pane.

{
  "name": "json-utils",
  "version": "1.0.0",
  "private": false,
  "tags": ["json", "tools"],
  "author": { "name": "Ada", "active": true },
  "score": 9.5,
  "notes": null
}

Frequently asked questions

Which side wins on a conflict?

The override (right) document wins for scalars and type changes. Objects are merged recursively instead of replaced.

What happens to null in the override?

Null is a real JSON value, so it replaces whatever was in the base. It does not delete the key.