Deep Merge (Free Online Tool)
Combine two object trees into one with configurable deep-merge conflict resolution
Paste your JSON → Get results instantly (no signup)
⚡ Instant resultsNo signupRuns in your browser
Try examples:
→ Deep merge these JSON inputs.
Output✓
Output✓
1{2 "name": "Alice",3 "age": 30,4 "email": "alice@example.com"5}Love the result?
Use this exact pipeline in your app, backend, or LLM workflow.
No setup needed. Works with curl, Node, Python.
Uses example data. For edited input, copy from the playground.
Works with:
- API responses
- Nested JSON
- Arrays & objects
Example: input → output
Input / OutputInputOutput
Input
{ "name": "Alice", "age": 30}Output
{ "name": "Alice", "age": 30, "email": "alice@example.com"}Read more on the blog
Advanced usage (optional)
Deep Merge
v1.0.0Merge
objectarray
Description
Deep Merge
Deep merge two JSON objects with configurable conflict resolution.
Description
This utility combines two JSON objects by merging their properties recursively. When both objects have the same key, you can choose how to resolve the conflict.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Conflict Strategy | enum | deepMerge | How to resolve when both objects have the same key |
| Array Strategy | enum | replace | How to handle array values during merge |
Conflict Strategy Options
- preferPrimary - Keep values from the primary (first) object
- preferSecondary - Use values from the secondary (second) object
- deepMerge - Recursively merge nested objects
Array Strategy Options
- replace - Replace primary arrays with secondary arrays
- concat - Concatenate arrays together
- unique - Concatenate and remove duplicates
Examples
Basic Merge
Base Input:
{
"name": "Alice",
"age": 30
}Merge Input:
{
"email": "alice@example.com"
}Config:
conflictStrategy: deepMerge
arrayStrategy: replaceOutput:
{
"name": "Alice",
"age": 30,
"email": "alice@example.com"
}Deep Merge Nested Objects
Base Input:
{
"user": {
"name": "Alice",
"settings": {
"theme": "dark"
}
}
}Merge Input:
{
"user": {
"settings": {
"language": "en"
}
}
}Config:
conflictStrategy: deepMerge
arrayStrategy: replaceOutput:
{
"user": {
"name": "Alice",
"settings": {
"theme": "dark",
"language": "en"
}
}
}Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Conflict Strategy | enum | deepMerge | How to resolve when both objects have the same key preferPrimary preferSecondary deepMerge |
| Array Strategy | enum | replace | How to handle array values during merge replace concat unique |
Examples
AI Prompt
Deep merge these JSON inputs.Output✓
Output✓
1{2 "name": "Alice",3 "age": 30,4 "email": "alice@example.com"5}Config
Conflict Strategy
deepMerge
Array Strategy
replace
API Usage
POST /api/v1/utilities/merge.deep-merge
Example:
curl -X POST https://your-domain.com/api/v1/utilities/merge.deep-merge \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":{"name":"Alice","age":30},"secondary":{"email":"alice@example.com"}},"config":{"conflictStrategy":"deepMerge","arrayStrategy":"replace"}}'Response
1{2 "name": "Alice",3 "age": 30,4 "email": "alice@example.com"5}