JSON Tools for AI Developers · Runs locally

For AI developers JSON Workbench

Natural language generation · Schema · Zod · OpenAPI · Function Calling · MCP · 30+ tools

JSON Merge

One file is defaults, another is the environment overlay. You only see the effective object after merge.

The left is base A, the middle is overlay B. Same-name keys come from B. Keys only in A are kept.

Arrays are replaced as a whole — they are not concatenated by element. Use Diff to see which keys changed.

Both documents are merged locally. Nothing is uploaded.

Diff first, then merge

If you are not sure B will drop a field, compare first. Merge is the action; Diff is the decision.

Why arrays are not concatenated

Concat vs replace has no single business meaning. A user list and a feature-flag array are different, so the default is replace.

How to use it

  1. Paste JSON A (base) and JSON B (overlay), or load a sample.
  2. Click Merge JSON.
  3. Check overwritten keys and arrays that were replaced as a whole.
  4. Copy the result. To trace the change, go back to Diff with the pre-merge A/B.
  5. Layered defaults can be merged in sequence: A+B, then C.

When to use it

  • default.json overwritten by env.json.
  • Stack an experiment config on a feature-flag object.
  • Preview a user patch applied to the original object.
  • Merge, then generate a Schema and inspect the final shape.

Keep in mind

  • Both sides must be valid JSON.
  • Objects nest downward; arrays are replaced by default.
  • Nothing is uploaded.

FAQ

How are arrays merged?

The whole array is replaced by default. Concatenate by hand, or split the merge into steps.

Is it a deep merge?

Objects nest downward. Exact depth follows the current implementation — scan nested results after merge.

How does this work with Diff?

Diff first so you see the gap, then decide which side wins.

Is it uploaded?

No.

Does null in B overwrite A?

Same-name keys are written from B, including null. Delete the key from B if you don't want that.

Can I merge three files?

Two at a time. Merge A+B, then treat the result as the new A and merge C.

What happens to key order?

Write order follows the implementation. Sort keys after merge if you need a stable Diff.

What about type conflicts?

B wins. If A is an object and B is a string, the result is a string.