Neatbo.

Merge JSON objects

Apply an override object while retaining untouched nested keys.

Browser-local processingInputJSONOutputJSONUp to 10 MiB per file · File limit: 2
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.

⌘ / Ctrl + Enter to run
JSON source
0 characters · 0 bytes

Review the merge

The second object takes priority. Matching objects combine recursively; other matching values are replaced as a whole.

The first box is the base object. The second box is the override object.

Enter both the base and override JSON objects.

  1. Base objectAwaiting JSON object
  2. Override objectAwaiting JSON object
Preparing the tool…

Before you start

Merge two JSON objects for layered configuration. The second object takes priority: matching objects combine recursively, while arrays, scalars and null replace the earlier value. Check the replacement paths before copying the result.

How to use this tool

  1. Paste the base and override JSON objects, or choose two JSON files in that order.
  2. Check that both inputs are objects. Review the paths replaced by the second object and any array conflicts.
  3. Merge the objects, inspect the JSON preview, then copy or download the complete result.

Supported inputs and limits

Both top-level inputs must be JSON objects with unique keys. Matching nested objects combine recursively; arrays and other values are replaced by the second input.

A null in the second object is kept as null; it does not delete a key. This is a recursive object merge, not RFC 7396 JSON Merge Patch.

Paste two objects (up to 1 MiB each) or choose exactly two UTF-8 JSON files (up to 10 MiB each). JSON has a 200,000-node and 128-level limit; output is limited to 20 MiB. Numeric tokens are preserved.

Files and input are processed in this browser. No account needed.

Worked example

Example input

{"a":1,"settings":{"color":"green"}}
Example options
{"settings":{"size":2}}

Example output

{
  "a": 1,
  "settings": {
    "color": "green",
    "size": 2
  }
}

When something does not work

If a merge cannot run, check that both inputs are JSON objects with unique keys. File mode requires two UTF-8 files in base-then-override order.

Frequently asked questions

Which input wins when keys overlap?

The second input wins. If both values are objects, their keys merge recursively; an array, scalar or null in the second input replaces the whole first value.

Does null remove a key?

No. This tool retains null as a value. RFC 7396 JSON Merge Patch uses null for removal, so use a patch tool if you need deletion semantics.

Can I merge two JSON files?

Yes. Choose file input and add exactly two UTF-8 JSON files. The first is the base and the second overrides it. You can reorder the files before running.

Why was my JSON rejected?

Both top-level values must be objects. Invalid JSON, duplicate object keys, unsupported UTF-8 and size or nesting limits are rejected.

Is my input sent to a server?

No. Tool input is processed in your browser, not sent to a server. Temporary workspaces stay in the same tab and are cleared by a refresh or tab closure. Save the results you need.

Documentation & further reading

Related tools