How to Merge Partitions with Diskpart Command or Free Partition Software

Summary

Is it possible to merge two partitions without losing data by cmd Diskpart? How do I merge partitions back together? This article tells you how to merge partitions into one with free methods.

Andrew Wright

Updated on 2025/04/29

by Andrew Wright

Need to combine multiple partitions into one on your hard drive? This guide covers methods to merge disk partitions using the built-in 'Diskpart' command-line tool or free partition software.

merge partitions cmd diskpart

Here are some cases related to expanding partitions. Explore the comparison between Windows built-in tools and a third-party free tool below, with detailed steps and helpful tips.

Disk Management Diskpart Partition Resizer
C, D Delete D, and merge c with unallocated space Delete D, merge with unallocated space Merge C and D into C without deleting D
C, Recovery Partition, D Cannot Merge Delete Recovery Partition and D, Merge C with unallocated space
  • Option#1: Delete the recovery partition, Merge C and D without deleting D; (Deleting Recovery)
  • Option#2: Shrink D, move Recovery, add space to C without losing data (Keep the Recovery)
C D E H (merge C and H) on the same disk, non adjacent

1, Delete D, E and H

2, Extend C with unallocated

1, Delete D, E and H

2, Extend C with unallocated space

  • Option#1, Delete D and E, expand C with the unallocated space, and Merge C with H.
  • Option#2, Shrink H to produce unallocated space, Move E and D, expand C with unallocated space

 

C and F (C on Disk 1; F on disk 2) non adjacent, not same dsik
  • 1, Backup data on disk 1 and 2
  • 2, Build RAID array
  • 3, Expand C with unallocated space
  • 1, Backup data on disk 1 and 2
  • 2, Build RAID array
  • 3, Expand C with unallocated space
  • 1, Backup data on disk 1 and 2
  • 2, build RAID array
  • 3, Add new disk space to C volume
Price FREE FREE FREE
      Download Win 11-7 (100% Free)
Download Win Server (Free Demo)

Option: You can move space from D to C without losing data using Partition Resizer Free

1. Merge Partitions with Free Disk Partition Software

For users unfamiliar with Diskpart or looking for an easier, data-safe method, IM-Magic Partition Resizer is a free tool that simplifies the process. Here’s how to use it:

For Windows 11/10/8/7 => Download Partition Resizer Free [100% Free]

For Windows Server 2025-2003 => Download Partition Resizer Server [Free Demo]

  1. Download, install, and launch IM-Magic Partition Resizer.
  2. Right-click the partition you want to merge and select “Merge.”open partition manager
  3. Select the adjacent partition to merge into the one. Merge two local drives in Windows 10 with freeware
  4. Click 'Apply Changes' to start merging partitions. And then you will have a larger C drive in the above example.

Note: This software is 100% free for home users and supports advanced operations like redistributing unallocated space without data loss.

[Video Tutorial] How to Merge Partitions

Watch the video tutorial below for a step-by-step guide:

Tip: Use this method if you’re not comfortable with command-line operations. It’s fast, user-friendly, and safe for your data.

Example:

merge partitions

2. Merge Partitions with Diskpart CMD (Delete Adjacent Volume)

Here is a brief overview of what Diskpart CMD can do and cannot.

merge partitions cmd diskpart

Using the built-in Diskpart tool in Windows, you can merge partitions through command-line operations only after you remove its right side adjacent contiguous partition. Follow these steps:

  1. Open the Start menu, type diskpart.exe, and hit Enter.
  2. In the Command Prompt, type list volume to display all partitions.
  3. Select the partition you want to merge by typing select volume X (replace X with the volume label or number, e.g., select volume F).
  4. Type delete volume to free up the space. This will make the volume unallocated.
  5. Type extend to merge the unallocated space into the adjacent partition.

Note: This process will erase all data on the partition being deleted. If you want to preserve your data, consider using free partition software like IM-Magic Partition Resizer, which allows merging without data loss. If there are some other partitions such as the EFI partition or the Recovery Partition standing in-between, the whole deleting right-side volume won't enable Diskpart extend command. Try Partition Resizer at this time.

3. Merge Partitions Using Unallocated Space

If you have right-side contiguous unallocated space on your drive, merging it with another partition is straightforward:

  1. Follow the same steps above to open Diskpart and list volumes.
  2. Select the target partition where you want to add the unallocated space using select volume X.
  3. Type extend to combine the unallocated space with the selected partition.

Tip: Ensure the unallocated space is directly adjacent to the partition you want to extend. If not, tools like IM-Magic Partition Resizer can help rearrange partitions without data loss.

Possible error: Virtual Disk Service error: There is not engough usable space for this operation.

Why and How to Fix: The unallocated space is not adjacent contiguous to the drive you want to expand. You may use free tool Partition Resizer to help move the unallocated space close to the drive and get the partition extended.

4. Merge Partitions Across Two Disks

Want to merge partitions from two different physical disks? Here’s what you need to know:

If the disks are configured in a RAID array (e.g., RAID 0 or RAID 1), they can be treated as a single logical drive. It can only extend adjacent partition. In such cases, follow the steps mentioned for Diskpart to merge partitions.

Steps:

  1. Open Diskpart and type list volume.
  2. Select the target volume using select volume X.
  3. Delete the volume with delete volume to create unallocated space.
  4. Extend another volume with extend.

Important: If your disks are not in a RAID setup, it’s not possible to merge partitions across them using Diskpart or any partitioning tool. Consider setting up a RAID array to combine two disks.

Option: Upgrade your disk (including the OS disk) to a larger SSD/HDD for free using Partition Resizer. Details: How to upgrade disk to another larger drive

5. FAQs

Question#1: How to merge unallocated space to C drive using CMD

Answer:

Diskpart is the command prompt utility that can help merge unallocated space to the C drive when these conditions are met:

  • Your C drive is formatted as NTFS
  • There are no other partitions between the unallocated space and the C drive
  • The unallocated space is contiguous and adjacent to the right side of the C drive

Follow these steps in CMD when all requirements are met:

  1. Open CMD as Administrator, type Diskpart and press Enter
  2. Type list disk
  3. Type select disk * (replace * with your disk number)
  4. Type list partition
  5. Type select partition * (replace * with your C drive partition number)
  6. Type extend

This will merge the unallocated space into your C drive.

Note: When your unallocated space is not contiguous to the right side of the NTFS c drive, try free tool IM-Magic Partition Resizer to help add space to the C drive without losing data.

Question #2: How do I merge partitions back together?

Answer: You can use the free tool IM-Magic Partition Resizer to merge partitions into one. Simply merge two adjacent partitions at a time until all partitions on the disk are combined into a single one.

Question #3: How to merge partitions in Windows 11 using CMD?

Answer: Windows 11's built-in tools (Disk Management or Diskpart) can merge partitions, but only if you delete the right-side contiguous partition first (they only support merging unallocated space). Alternatively, you can use IM-Magic Partition Resizer to merge partitions without data loss.

More Related Articles You May Like

Related Product