JSON merge tools for object and array documents
Combine two or more JSON object or array documents and decide what happens when their contents overlap. Open the JSON Merge Tool to set the merge rules, inspect the output tree, review conflicts, and export the result.
Merge JSON objects and arrays
The JSON Merge Tool combines multiple JSON object or array documents into one document. It suits merges where overlapping keys, explicit null values, or array contents need a rule you can review before export.
- JSON Merge Tool combines two or more JSON object or array documents. It lets you choose shallow or recursive deep merging, then apply the selected rules globally or for particular paths.
Choose how to merge JSON files
Set the rules before you inspect the merged document:
- Set precedence when the same object key appears in multiple documents.
- Choose a null policy for values written as
null. - Choose how arrays are handled: replace, concatenate, union, or merge by key.
- Apply the rules globally or to particular paths when one part of the document needs a different rule.
Review a JSON merge before export
Choose shallow merging when the rule applies at the current level. Choose recursive deep merging when nested objects also need to be combined. The JSON Merge Tool shows the full output tree and every conflict, so you can inspect the places where precedence, null handling, or array behavior changes the result.
Where JSON merging comes up
- Combine JSON configuration documents and set precedence for keys that occur in both inputs.
- Join JSON arrays from separate documents by choosing concatenation, union, replacement, or merge by key.
- Review a nested merge by path, with deep merging for objects and a separate array rule for one branch.
When to use JSON Merge Tool or JSON Tools
Use JSON Merge Tool to combine object or array documents and control conflicts, nulls, or arrays. Visit JSON Tools for pages that clean, validate, compare, flatten, or query JSON and JSON Lines.
Frequently asked questions
How do I merge two JSON objects?
Open JSON Merge Tool and provide the two JSON object documents. Choose shallow or recursive deep merging, set precedence and the null policy, review the conflicts, then export the merged document.
Can I combine more than two JSON documents?
Yes. JSON Merge Tool combines two or more JSON object or array documents. Apply the selected merge rules globally or set them for particular paths.
How should I merge JSON arrays?
Choose an array behavior: replace, concatenate, union, or merge by key. Set that handling globally or for a particular path.
Should I use JSON Merge Tool or another JSON tool?
Use JSON Merge Tool to combine documents and review merge conflicts. Use another JSON Tools page to clean, validate, compare, flatten, or query JSON or JSON Lines.