How to use the JSON Array Merger
Merge JSON arrays or objects from multiple sources:
1
Add JSON sources
Paste two or more JSON arrays or objects into the source panels. Add additional sources with the + button — up to 10 sources are supported.
2
Choose merge strategy
For arrays: Concatenate (append all elements) or Deduplicate (remove entries that share the same key value). For objects: Shallow merge (top-level keys only) or Deep merge (recursively combine nested objects).
3
Set conflict resolution
For duplicate keys when merging objects: keep First value, keep Last value (overwrite), or Merge both into an array for manual review.
4
Click Merge
Get the merged JSON output instantly. Review the result and copy or download it.
When to use this tool
Use this whenever you need to combine JSON data from multiple sources into one structure:
- →Combining paginated API responses (multiple pages of results) into a single flat JSON array
- →Merging two or more JSON config files where later settings should override earlier ones
- →Deduplicating a JSON array by a specific key field like id or email to remove duplicate records
- →Deep-merging two objects where nested properties should be combined rather than the whole nested object being replaced
- →Combining JSON exports from multiple environments (dev/staging/prod) for comparison
- →Merging feature flag config files from multiple sources with a defined priority order
- →Joining multiple JSON datasets that share a common schema before analysis or import
Frequently asked questions
Q:What is the difference between shallow merge and deep merge?
Shallow merge replaces top-level keys entirely. If both objects have a nested key, the later object's full nested value wins. For example: merging { a: { x: 1 } } and { a: { y: 2 } } with shallow merge gives { a: { y: 2 } } — the x key is lost. Deep merge combines nested objects recursively: the result is { a: { x: 1, y: 2 } }. Use deep merge when objects share a nested structure and you want to combine all nested fields rather than replace them.
Q:How does array deduplication work?
When you select the Deduplicate strategy, you specify a key field (like id or email). The merger removes duplicate objects that share the same value for that key field, keeping the first occurrence by default. For example, merging two arrays that both contain { id: 1, name: 'Alice' } produces just one record. If no key field is set, exact object equality is used for deduplication.
Q:What happens to conflicting keys during object merge?
You control conflict resolution with three options: Keep First keeps the value from whichever source came first; Keep Last (the default) overwrites with the value from the latest source; Merge Both creates an array containing both values at the conflicting key, so you can manually decide which to keep.
Q:How many JSON sources can I merge?
You can add up to 10 JSON sources. They are processed in order from top to bottom, so the last source has the highest priority in conflicts when using Keep Last mode.
Q:Can I merge arrays and objects at the same time?
Each merge operation works on either all arrays or all objects — mixing types in one operation is not supported, as arrays and objects have fundamentally different merge semantics. For mixed-type data, merge them separately and combine the results.
Q:Is this the same as JavaScript Object.assign or the spread operator?
Shallow merge behaves like Object.assign({}, a, b) or { ...a, ...b } — top-level keys from later sources win. Deep merge is equivalent to a recursive Object.assign that traverses nested objects, which is not natively available in JavaScript (libraries like lodash.merge or deepmerge do this). Use this tool to perform deep merge without writing code.