How to merge two JSON files
Open the first file in panel A and the second file in panel B with the Open file buttons, or paste their contents, then press Merge. The combined JSON appears in the result box, and you can copy it or download it as a .json file.
How the merge works
If both inputs are objects, Parsekit merges them key by key. When a key holds another object on both sides, it merges those nested objects too, going as deep as needed. When a key's value is a plain value or an array on either side, the value from JSON B replaces the one from JSON A.
Example: merging two objects
JSON A:
{"user":{"name":"Ali","age":24}}
JSON B:
{"user":{"age":25,"city":"Jhelum"}}
Merged result:
{"user":{"name":"Ali","age":25,"city":"Jhelum"}}
The nested user objects were combined. The age conflict was won by JSON B, and the name and city were both kept.
Combining JSON arrays
If both inputs are arrays instead of objects, they are joined end to end into one longer array. Nothing is deduplicated, so repeated items are kept.
For example, combining [1,2] and [2,3] gives [1,2,2,3].
Merge multiple JSON files
This tool merges two inputs at a time, but you can combine as many JSON files as you need by repeating the steps. Merge file 1 and file 2, copy the result into panel A, load file 3 into panel B, and press Merge again. Repeat until every file is included. For objects, later files win key conflicts, so put the file you trust most last.
Merge arrays: join, replace or remove duplicates
When the same key holds an array in both files, pick how to combine them with the Arrays menu. Standard joins two top-level arrays, and a nested array in JSON B replaces the one in JSON A. Always join arrays appends the items from B after the items from A at every level. Join arrays, remove duplicates does the same and then keeps each repeated item only once.
After every merge, the status line also tells you how many values from JSON B replaced a different value from JSON A.
Frequently asked questions
What happens when both files have the same key?
If both sides hold an object for that key, the two objects are merged recursively. Otherwise, the value from JSON B wins and replaces the value from JSON A.
Can I merge more than two files?
This tool merges two inputs at a time. To combine three or more, merge the first two, then paste that result back into panel A along with the third file in panel B, and repeat.
What if one file is an array and the other is an object?
Both inputs need to be the same shape: two objects, or two arrays. If they don't match, the tool shows an error instead of guessing how to combine them.
Are my JSON files uploaded to a server?
No. The merge runs entirely in your browser with JavaScript. Nothing you paste leaves your device, so it is safe to use with private or sensitive data.
Does merging remove duplicate items from arrays?
No. Arrays are joined as they are, and repeated items are kept. If you need unique values only, remove the duplicates from the result afterwards.
Is this JSON merge tool free?
Yes. It is free, needs no signup, and has no usage limits.
How do I check what changed after merging?
Use the JSON Diff tool to compare the original file with the merged result and see exactly which keys were added or changed.
How do I combine JSON files into one?
Open the first file in panel A and the second in panel B, then press Merge. For more than two files, copy the merged result back into panel A, load the next file in panel B, and merge again. When you finish, download the result as a .json file.
How do I merge JSON arrays without duplicates?
Choose Join arrays, remove duplicates in the Arrays menu, then press Merge. Arrays under the same key in both files are joined, and any repeated item is kept only once.
Related tools
Format and validate JSON before merging, to catch syntax errors. Use JSON Diff to compare two JSON files. Need the opposite? Split a large JSON file into smaller parts. Convert the merged result with JSON to CSV or JSON to YAML.