Deep merge two JSON objects into one — resolve conflicts with visual control
JSON merging combines two or more JSON documents into a single unified document by recursively integrating their keys and values. A deep merge descends into nested objects, combining properties at every level rather than simply overwriting top-level keys. When both documents contain the same key with different values, the merge must resolve this conflict — typically by letting the second document's value take precedence.
Merging is a common operation when combining default and user-specific configuration files, aggregating data from multiple API responses, reconciling partial updates with base documents, and assembling configuration from environment-specific overrides. Unlike simple object spread or Object.assign, a proper deep merge handles nested objects without losing deeply nested properties from the first document when the second document only updates a subset of fields at that level.
PinusX merges your JSON with 100% client-side processing — both input documents and the merged output never leave your browser. This is essential when merging configuration files that contain deployment secrets, database passwords, or API keys. Server-based tools pose a real threat: in November 2025, jsonformatter.org leaked over 80,000 credentials that users had pasted for processing. PinusX prevents this entirely because the merge algorithm executes locally in your browser using JavaScript. No data is transmitted, logged, or stored on any external server. Merge your production configs and sensitive data safely.
By default, the second (right) document takes precedence. If both documents have a key 'name' with different string values, the merged result uses the value from the second document. For nested objects with the same key, the merge recurses into both objects to combine their properties.
Array merging can follow different strategies. By default, arrays from the second document replace arrays from the first. Some merge modes concatenate arrays or deduplicate their elements. Our tool shows you the merge result so you can verify arrays are combined as expected for your use case.
You can merge multiple documents sequentially. Merge documents A and B first, then merge the result with document C, and so on. Each merge builds on the previous result, with later documents taking precedence over earlier ones for conflicting keys.
The merged output preserves keys in the order they first appear across both documents. Keys from the first document appear first, followed by any new keys from the second document. Use the JSON Sort Keys tool after merging if you need alphabetical key ordering.
Yes. Documents do not need matching structures. Keys unique to either document are included in the result. Conflicts only arise when both documents have the same key path, and those are resolved by favoring the second document's value.
Your data never leaves your browser. 100% client-side processing.
Get instant alerts when your endpoints go down. 60-second checks, free forever.
Start Monitoring Free →