JSON Merge
Merge multiple JSON objects into one
Input (Array of JSON objects)
Merged Output
What is JSON Merge?
Need to combine multiple JSON objects into one? This tool merges multiple JSON (JavaScript Object Notation) objects into a single unified object. Great for combining config files, merging API responses, or consolidating data from different sources.
Pick Deep or Shallow. Deep merge walks into nested objects and combines them key by key, the way Object.assign would if it went all the way down. Shallow merge is exactly Object.assign({}, ...objects): a nested object from a later item replaces the earlier one wholesale. In both modes, arrays are replaced, not concatenated or merged by index, and the last object wins on any conflict. That's also how JSON Merge Patch (RFC 7386) treats arrays, if you've worked with PATCH APIs. The output is plain RFC 8259 JSON, with big integers kept exact.
Everything happens in your browser, so your JSON never leaves your computer. The output updates as you type or switch modes.
How to Use the JSON Merge
Follow these steps to merge multiple JSON objects. Each step uses the actual buttons and panels on this page.
Paste Array of JSON Objects or Upload
Paste a JSON array of objects into the left Input panel (or one object per line), or click Upload to load a file. Click Sample to load a set of defaults plus overrides for subscriber SUB-1001. Input format:
[{"plan": "Basic", "settings": {"roaming": false, "dataCapGb": 5}}, {"subscriberId": "SUB-1001", "settings": {"roaming": true}}]Later objects override earlier ones when keys conflict. Every item must be an object; a string, number or array in the list gets a clear error instead of a strange result.
Choose Deep or Shallow Merge
Click Deep (default) to recursively merge nested objects – values from later objects merge into earlier ones. Click Shallow to overwrite nested objects entirely. The right Merged Output panel updates automatically.
Copy or Download
Check the merged result in the output panel, then grab it with "Copy" or keep a file of it with "Download".
When You'd Actually Use This
Config File Merging
Merge default configuration with environment-specific overrides. Deep merge preserves nested settings while allowing selective overrides.
API Response Combination
Combine multiple API responses into a single object. Useful when you need to aggregate data from different endpoints.
Data Consolidation
Merge JSON exports from different sources. Combine user data, settings, or preferences into unified objects.
Object Composition
Build complex objects by merging simpler ones. Great for creating default objects and then adding specific properties.
Common Questions
Is my JSON data stored?
No. Everything happens right in your browser. Your JSON never leaves your computer.
What's the difference between deep and shallow merge?
Deep merge recursively combines nested objects. Shallow merge replaces them. With the sample, deep merge keeps settings.dataCapGb: 5 from the defaults while taking settings.roaming: true from the override. Shallow merge gives you only the override's settings object, so dataCapGb is gone.
What happens with conflicting properties?
Properties from later objects override properties from earlier ones. The last object in the list wins for any conflicting key.
Can I merge arrays?
No. Arrays are values like any other: if two objects both have an items array, the later one replaces the earlier one entirely, in both modes. The list you paste is the list of objects to merge, so it has to contain objects only.
What if objects have different structures?
The merge combines all properties from all objects. Properties that exist in one object but not others are preserved. The result contains all unique properties.
Does it work with invalid JSON?
No, you'll need valid JSON first. If something's broken, you'll see an error. The JSON Validator points at the problem, and the JSON Fixer can repair common mistakes.
Other JSON Tools You Might Need
Merging is just one JSON task. Here are other tools that work well together: