Merge JSON configs instantly (no code).
Paste your base + override JSON and see the merged result live.
→ Try the tool below
Shallow merges often break configs by wiping nested defaults.
Learn how to merge multiple JSON configuration files safely, resolve conflicting keys, and prepare structured settings for deployment workflows.
Merge JSON configs instantly (no code).
Paste your base + override JSON and see the merged result live.
→ Try the tool below
Shallow merges often break configs by wiping nested defaults.
1{2 "appName": "MyService",3 "version": "2.1.0",4 "server": {5 "host": "0.0.0.0",6 "port": 8080,7 "cors": {8 "enabled": true,9 "origins": [10 "https://myservice.com",11 "https://admin.myservice.com"12 ]13 }14 },15 "database": {16 "host": "db.prod.internal",17 "port": 5432,18 "name": "myservice_prod",19 "pool": {20 "min": 5,21 "max": 50,22 "idleTimeout": 1000023 }24 },25 "logging": {26 "level": "warn",27 "format": "json",28 "file": "/var/log/myservice/app.log"29 },30 "features": {31 "darkMode": true,32 "betaFeatures": false,33 "analytics": true34 }35}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.
The override updates only specific fields:
server.port changed from 3000 → 8080database.host updated for productiondatabase.pool remain unchangedThis behavior is called a deep merge — only the fields you override are updated, while the rest of the configuration is preserved.
Why this matters: use this pattern when you need to merge nested JSON config, deep merge environment config, or combine base and override JSON while preserving defaults.
{
"server": {
"port": 8080,
"cors": {
"enabled": true,
"origins": ["https://myservice.com"]
}
},
"database": {
"host": "db.prod.internal",
"pool": {
"min": 2,
"max": 10
}
}
}If you also need to clean JSON before deployment or compare JSON config changes before merging, the same pipeline approach can help you prepare the data.
JSON config merging is the process of combining a base JSON file with an override file where matching fields are updated and unchanged nested defaults are preserved.
Unlike a shallow merge, a deep merge can update nested values without replacing the entire parent object.
Environment-specific files usually change only a few values, but those values often live inside nested objects like server, database, logging, and features.
Common use cases include building production configs, merging CI/CD settings, and assembling app configuration from shared defaults.
Before: a base config has development defaults.
{
"server": {
"port": 3000,
"cors": {
"enabled": true,
"origins": ["http://localhost:3000"]
}
},
"database": {
"host": "localhost",
"pool": {
"min": 2,
"max": 10
}
}
}Override: production-specific values update only part of the config.
{
"server": {
"port": 8080,
"cors": {
"origins": ["https://myservice.com"]
}
},
"database": {
"host": "db.prod.internal"
}
}You can merge JSON configs online by pasting the base config, adding the environment override, selecting Deep Merge, and previewing the final config.
You can export and download the final merged config for deployments, CI/CD pipelines, app settings, or internal automation.
To merge JSON configuration files, load the base config first, apply the override second, and define how conflicts and arrays should be handled.
The Deep Merge utility can apply the same merge rules repeatedly once the method is clear.
You can copy this setup:
{
"conflictStrategy": "deepMerge",
"arrayStrategy": "replace"
}For this example, the workflow does:
You end up with:
server.port and database.hostIf the merged output is too broad, adjust the array strategy or split the merge into smaller config layers.
The pipeline example below shows the generated workflow that combines the base config and production override.
JSON config gets messy because shared defaults, local settings, staging overrides, and production overrides evolve separately.
Common problems include:
Without a repeatable workflow, config merging often becomes fragile build-time logic that is hard to review and harder to reuse.
Unlike simple object assignment, this approach should account for nested defaults, conflict rules, arrays, and repeatable output.
JSON config merging can break down when conflict behavior is unclear or when arrays need custom handling.
Common limitations include:
null values may mean remove, override, or keep depending on the systemFor very large JSON files, consider streaming or chunked processing before running the full merge workflow.
For these cases, compare configs first, validate the final schema, or split config layers into smaller steps.
You can merge JSON configs using scripts or online tools. Scripts give control but require maintenance. Tools are faster for repeated workflows, especially with nested environment overrides.
Use this when:
Use scripts when config rules are stable and code-owned. Use a visual workflow when teams need to review merged output or adjust array/conflict rules safely.
For simple objects, a short script may be enough. For nested configs, programmatic merging needs extra rules for arrays, null values, conflict priority, and validation.
A visual JSON pipeline can help developers prototype merge rules, test the output, and reuse the workflow through an API. See the OpenAPI reference for repeatable API-based workflows.
The best approach should support:
Forge Json is designed for these use cases. Use it when JSON config files are nested, environment-specific, reused across teams, or need repeatable merge behavior rather than a one-off script.
Merge JSON configuration files by loading a base config, applying an override config, and using deep merge rules to preserve untouched nested defaults.
A deep merge updates nested fields without replacing the entire parent object, so defaults like database.pool can survive environment overrides.
Arrays need an explicit strategy, such as replace or concatenate. For environment configs, replacing arrays is often safer and easier to review.
Use scripts for stable config rules. Use tools or reusable workflows when teams need to preview output, adjust array behavior, or reuse merge logic.
Support material
Use these examples to understand the transformation and apply the same workflow in your own JSON tasks.
Before & After
See how this workflow reshapes the sample material into clean output.
{ "appName": "MyService", "version": "2.1.0", "server": { "host": "0.0.0.0", "port": 3000, "cors": { "enabled": true, "origins": [ "http://localhost:3000" ] } }, "database": { "host": "localhost", "port": 5432, "name": "myservice_dev", "pool": { "min": 2, "max": 10, "idleTimeout": 30000 } }, "logging": { "level": "debug", "format": "pretty" }, "features": { "darkMode": false, "betaFeatures": false, "analytics": true }}{ "appName": "MyService", "version": "2.1.0", "server": { "host": "0.0.0.0", "port": 8080, "cors": { "enabled": true, "origins": [ "https://myservice.com", "https://admin.myservice.com" ] } }, "database": { "host": "db.prod.internal", "port": 5432, "name": "myservice_prod", "pool": { "min": 5, "max": 50, "idleTimeout": 10000 } }, "logging": { "level": "warn", "format": "json", "file": "/var/log/myservice/app.log" }, "features": { "darkMode": true, "betaFeatures": false, "analytics": true }}1{2 "conflictStrategy": "deepMerge",3 "arrayStrategy": "replace"4}Continue with another practical guide in the same workflow area.
Transform an OpenAI API response into clean production JSON by extracting message content, token usage, model, and finish status.
Learn how to transform JSON to JSON with schema mapping, API normalization, validation, and reusable workflow stages.
Normalize ecommerce JSON by flattening order data, preparing API data for analytics, and shaping nested orders into clean export-ready records.