JSON Merge Tool
Merge two JSON objects with a deep or shallow merge, and choose how to handle arrays.
Deep Merge: Recursively merges nested objects. Properties from patch override base.
Shallow Merge: Only merges top-level properties. Nested objects are replaced entirely.
This tool merges two JSON objects into one. The "Base" JSON is the starting point, and the "Patch" JSON adds or overrides values. Choose a deep merge, which combines nested objects, or a shallow merge, which looks only at top-level keys. You can also choose how to handle arrays.
Config files
Merge environment configs with defaults
API responses
Apply a partial update to an API response
Package.json
Merge dependencies or scripts sections
Data migration
Combine and update JSON data files
What is JSON merging?
JSON merging combines two JSON objects into one. A deep merge combines nested objects at every level. A shallow merge combines only the top-level properties.
What's the difference between deep and shallow merge?
A deep merge walks into nested objects and keeps properties from both sides. A shallow merge looks only at top-level properties, so a nested object in the patch replaces the whole object in the base.
How does conflict resolution work?
When both objects have the same property, the value from the second (patch) object wins. For arrays in a deep merge, you can replace the array, concatenate both arrays or merge items by index.
Can I merge nested JSON objects?
Yes. Choose deep merge, and the tool combines nested objects at any depth.
Private by default
All merging happens in your browser. Your JSON never leaves your device.
Related tools
JSON Formatter
Format JSON online in your browser. Paste or upload JSON to tidy it with 2 or 4 space indents, find syntax errors, minify it or browse it as a collapsible tree.
JavaScript to JSON
Convert JavaScript object literals to valid JSON
Regex Tester
Test JavaScript regex patterns online with live match highlighting, match positions and capture groups. Toggle the g, i, m, s and u flags. Free, no signup.