How to merge partitions and Unallocated space in Windows?

Some manufacture PCs/servers, even the one you built it yourself may not meet your needs after running the PC/server for a period. The two typical issue include:

  1. The system C: drive or a data drive runs out of free space, you can add unused space from another drive by merging the two partitions.
  2. There is free Unallocated space but you do not want to create any more drives, so you may consider merge the Unallocated space to an existing drive.

Many people feedback they do not know or worry about merging partitions, so today I want to share my experience about how to merge partitions in all Windows platform, including Windows 10/8/7/Vista/XP and Server 2016/2012/2008/2003 (R2). To explain better, I divided the introduction into 2 parts.

  1. Merge Unallocated space
  2. Combine 2 disk partitions

Combine Unallocated space

Unallocated space, sometimes called “free space”, is logical space on a hard drive that the operating system can write to. To put it another way it is the opposite of “allocated” space, which is where the operating system has already written files to.

If the operating system writes a file to a certain space on the hard drive that part of the drive is now “allocated”, as the file is using it the space, and no other files can be written to that section. If that file is deleted then that part of the hard drive is no longer required to be “allocated” it becomes unallocated. This means that  new files can now be re-written to that location.

Different with unused space in a drive, Unallocated space does not belong to any drives. By merging partitions, you can add the Unallocated space into a drive and change it to be unused space of this drive.

Merge partitions with Diskpart

In Windows XP and Server 2003, if you do not want to use 3rd party software, the only choice to merge partition is running Diskpart. Diskpart is a text-mode command line tool interpreter which enables storage objects such as disks, partitions or volumes configuration and management from a script, remote session, or direct input from a command prompt. To combine partitions with Diskpart:

Step1: Press ‘Windows‘ and ‘R‘ key on the keyboard, type ‘cmd‘ and click ‘OK‘ or press ‘Enter’.

MS-DOS command line window will be opened.

Step 2: In the command line window, type diskpart and press ‘Enter’.

Diskpart command

Step 3: Type “list volume” to display the existing volumes on the computer.

List volume

Step 4: Type “select volume X”, X is the number or drive letter of the partition that you want to merge Unallocated space into.

Select volume

Step 5: Type extend.


Diskpart extended

As the message shows, Unallocated space has been merged into drive E:, However, there is big limitation by merging partitions with diskpart – Unallocated space can only be merged into the drive that is adjacent and before the Unallocated, all other drives cannot use this Unallocated space.

If you want to combine to other drives, you have to use 3rd party software.

Merge Unallocated space under Disk Management

To many people, it is too hard to use command line, so Microsoft add GUI function in Disk Management of Windows Vista/7/8/10 and Server 2008/2012/2016. Where you can do basic operations such create, format and delete partitions, advanced operation to shrink partition and extend volume. To merge the Unallocated space:

Step 1: Right-click C drive and select “Extend Volume…”

 Merge c driveStep 2: In the pop-up window, select available Unallocated space.

Add space

Step 3: Confirm the operation and click “Finish” to proceed.

Confirm merging

Partition merging operation complete in a short time.

Partitions merged

However, if there is another data drive in the middle, you cannot merge the Unallocated space into C: drive. To do this, you need 3rd party software, too.

Cannot merge drives

Merge Unallocated space with 3rd party software

Step 1Download and install NIUBI Partition Editor. The Unallocated space can be merge into any adjacent partition. For example, the first Unallocated space can be combined into drive C: and D.

Merge unallocated

Step 2: Right click drive D and select “Resize/Move Volume”.

Merge unallocated to D

Step 3: In the pop-up window, if you want to merge the first Unallocated space, drag the left border leftwards. If you want to merge the second Unallocated into D drive, simply drag the right border rightwards.

Drag to merge

I did drag left border to merge the first Unallocated space.

Drag to merge

The program will back to the main window after clicking OK.

Unallocated combined

Step 4: Click Apply on top left to execute.

Merge non-adjacent Unallocated space

If you want to merge the Unallocated space that is behind D into C drive, follow the steps:

Step 1: Right click D and select “Resize/Move Volume“. In the pop-up window, drag middle position rightwards to move this partition.

Move partition

Move volume

Click OK, the Unallocated space will be moved to behind C drive.

Unallocated moved

Step 2: Right click C drive and select “Resize/Move Volume” again. In the pop-up window, drag the right border rightwards to combine the Unallocated space.

Drag to merge

Click OK and back to the main window, press Apply on top left to execute, done.

Combine disk partitions

If you want to combine 2 physical partitions, follow the steps:

  1. Back up all files in drive D to other partition.
  2. Delete D and the disk space will be changed to Unallocated.
  3. Now the Unallocated space can be merge into the adjacent drive C or E.

Download this free partition manager