JSON Tool
JSON Merge Tool
Merge multiple JSON files or objects into one. Paste the contents of each file and choose a deep or shallow merge strategy.
Strategy
Object 1
Loading editor...
Object 2
Loading editor...
Deep Merge
Merged Result
Loading editor...
About JSON Merge Tool
This tool combines multiple JSON objects into a single object. You can choose between different merge strategies to handle nested objects and conflicts.
How to Merge JSON Files
This JSON merger works on pasted text rather than uploaded files. To combine JSON files into one, open each file in a text editor and copy its contents.
- Paste the contents of the first JSON file into Object 1 and the second file into Object 2.
- Click Add Object for each extra file you want to combine.
- Choose Deep Merge or Shallow Merge under Strategy.
- Copy the merged result, or click Download to save it as merged.json.
Each box shows Valid or Invalid as you paste, so a broken file is easy to spot before you merge. Every file should contain a JSON object at the top level.
Merge Strategies
- Deep Merge: Recursively merges nested objects. Arrays are replaced, not concatenated.
- Shallow Merge: Only merges top-level properties. Nested objects are replaced entirely.
Conflict Resolution
When the same key exists in multiple objects, the value from the last object takes precedence (last-wins strategy).
Example: Deep Merge
Object 1:
{"user": {"name": "Alice", "age": 30}}
Object 2:
{"user": {"email": "alice@example.com"}}
Result:
{"user": {"name": "Alice", "age": 30, "email": "alice@example.com"}}Example: Shallow Merge
Object 1:
{"user": {"name": "Alice", "age": 30}}
Object 2:
{"user": {"email": "alice@example.com"}}
Result:
{"user": {"email": "alice@example.com"}}