Forum Discussion
How to merge two partitions in windows 11/10 without losing data?
The built-in diskpart utility is a free command line (cmd) tool you can use for merging two partitions on any Windows 11 and Windows 10 computer. It will delete one partition and then extending the other to use the freed space.
How to merge two partitions using cmd in Windows 11/10
Open a new command prompt window and enter the following command to open diskpart utility.
diskpart
List disks and select disk for merging two partitions without losing data.
list disk
Identify the disk that contains the partitions you want to merge. Suppose it’s Disk 0, then type:
select disk 0
List partitions on the target disk.
list partition
Identify the two partitions you want to merge. For example, Partition 1 and Partition 2.
You can only extend a partition into unallocated space directly after deleting an adjacent partition. To delete Partition 2 (for example), type:
select partition 2
delete partition
Warning: This will delete all data on Partition 2.
Now select Partition 1 to extend it into the newly unallocated space:
select partition 1
extend
DiskPart will extend Partition 1 to include the space that was previously Partition 2.