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 provides the foundation, and the "Patch" JSON adds or overrides values. Choose between deep merge (recursive) or shallow merge (top-level only), and configure how arrays should be handled.
Config Merging
Merge environment configs with defaults
API Responses
Combine partial API data updates
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. Deep merge recursively combines nested objects, while shallow merge only combines top-level properties.
What's the difference between deep and shallow merge?
Deep merge combines nested objects recursively, preserving all properties. Shallow merge only merges top-level properties - nested objects are completely replaced.
How does conflict resolution work?
When both objects have the same property, the value from the second object (right side) overwrites the first. In arrays, you can choose to append or replace.
Can I merge nested JSON objects?
Yes! Use deep merge to combine nested JSON objects at any level. The tool handles complex nested structures automatically.
Privacy First
All merging happens in your browser. Your JSON data never leaves your device.
Free online JSON formatter, validator, and beautifier. Format, minify, validate, and prettify JSON data instantly. No signup required. Works offline in your browser.
Convert JavaScript object literals to valid JSON
Free online regex tester with real-time highlighting, match detection, and capture group display. Test JavaScript regex patterns instantly. No signup required.