How To Convert MBR to GPT Using CMD

Learn how to convert MBR to GPT using Command Prompt within Windows or during Windows installation.

Part 1. Why Convert MBR to GPT?

In order to make the most of your storage devices, it is best to dedicate drives for specific purposes. You may look to convert MBR to GPT with CMD prompt for having more primary partitions on each disk.

convert mbr to gpt using cmd prompt

Master Boot Record (MBR) and GUID Partition Table (GPT) are two different partition table styles on the hard disk. GPT is known to be better than MBR. It has several advantages over MBR, which may be the main reason for converting MBR to GPT.

You can go over the difference between the MBR and GPT storage sectors in the table below.

Sector Type
Max Capacity
Max Partitions
Boot Data Location
Supported OS
GPT It is a newer way of partitioning found on newer UEFI systems. 9.72 ZB (1 ZB = 1 billion TB) 128 Throughout the drive Windows 8/8.1/10 64-bit, Windows 11
MBR It is a legacy partition used on older BIOS systems. 2 TB 26 At the beginning of the drive Windows 95/98/XP/2000/2003/7

When upgrading from Windows 10 to 11, GPT can offer you much more flexibility with its higher number of partitions and more capacity. Still, doing it requires using the diskpart utility only available with the command prompt. If you wish to learn about the change MBR to GPT commands, this is just the guide for you.

Part 2. Can You Convert MBR to GPT Without Data Loss Using DiskPart Command Prompt?

No, you cannot convert MBR to GPT without data loss using DiskPart CMD because changing MBR to GPT with CMD requires deleting all partitions on the disk, which erases all data. Therefore, you should back up important files before performing this operation. However, if you have some budget, you can use a third-party program like AOMEI Partition Assistant Professional, which can help convert MBR to GPT without data loss.

Part 3. How To Change MBR to GPT Using CMD on Windows 11/10/8/7?

DiskPart is a free and professional utility available for all Windows versions. You can use it through the command prompt for all your disk partition-related needs without involving any third-party software, including converting the sector type from MBR to GPT.

Also note that with DiskPart, you can convert only the basic MBR disks that don't have any partitions to GPT disks. If there are some partitions or volumes already, you need to delete all the partitions or volumes right before conversion. That's why running the clean command is imperative before the DiskPart converts MBR to GPT. Thus, it helps to back up all your data on the disk to avoid data loss.

To convert your disk from MBR to GPT using DiskPart CMD, follow the below steps.

Step 1. Open the Run program by pressing Win+R. Now, type in 'cmd' in the box and press Enter to launch Command Prompt.

start the command prompt

Step 2. You can now operate in the elevated cmd window. Here, simply type diskpart and press Enter. This will launch the DiskPart utility.

change mbr to gpt using diskpart cmd

Step 3. In the next step, you need to type the commands as follows, pressing the Enter key after each line:

  • list disk - this will display the online disks you currently use on the system.
  • select disk n – Here, n represents the exact number of disks from the list that you need to convert from MBR to GPT.
  • clean - The command will remove all data and partitions previously present on the disk you are trying to convert.
  • convert gpt - It will start the MBR to GPT conversion.
choose the disk for cleaning to proceed

Step 4. You can use the list disk command again to check whether the disk has been converted to GPT. If you’re satisfied with the result, type in exit and press Enter to exit the DiskPart utility.

Part 4. How To Convert MBR to GPT Using CMD During the Windows OS installation

When you encounter the error “Windows cannot be installed to this disk. The selected disk has an MBR partition table.” during the Windows installation process, you can convert MBR to GPT using CMD during the Windows OS installation to fix it.

Step 1. As you’re installing Windows, press Shift + F10 to launch Command Prompt in Active Windows.

launch command prompt when installing windows

Step 2. Type in diskpart and hit Enter to start the DiskPart utility.

Step 3. Use the list disk command to display a list of all available drives.

choose the disk for cleaning to proceed

Step 4. Type in select disk x and hit Enter (replace ‘x’ with the appropriate number of the MBR disk).

Step 5. Type clean and press Enter. This step will delete all data and partitions on this disk.

Step 6. Type convert gpt and press the Enter key to execute the conversion.

Once the program converts the sector, you can proceed with the installation of Windows as regular. Here is the video that will show you the process in more detail.

More Related: What is MBR2GPT.EXE Tool

Part 5. How To Recover Lost Data if You Forget to Backup

Often, we need to remember to back up our data before the conversion. That can create a recipe for disaster as DiskPart deletes everything on the disk you are converting. The command-line tool first wipes the disk and then proceeds with the conversion from MBR into GPT. If you use the clean all command to clear the disk, recovering any lost data becomes impossible.

If you ever find yourself in such circumstances, don't worry, as all is not lost. You can still recover your lost data using Wondershare Recoverit data recovery software. It is a groundbreaking application that comes with a host of valuable data recovery features.

Wondershare Recoverit – Leader in Data Recovery

5,481,435 people have downloaded it.

Recover over 1000 file types from almost any storage media, such as SSDs, HDDs, USB flash drives, SD cards, external hard disks, digital cameras, etc.

Efficiently handle various data loss scenarios, including accidental deletion, empty recycle bins, formatting, lost partition, virus attack, RAW, and RAID corruption.

An intuitive interface that lets you preview the files before recovery. No payment is required if the files are unrecoverable.

You can download Wondershare Recoverit for your preferred Windows or macOS computer. Once installed, follow the below-mentioned steps to get any essential data back from the disk of your choice.

Step 1. Launch Recoverit by using the Search function or the Start menu.

launch recoverit data recovery

Step 2. Select a location from where you want to recover the files.

choose the location for scanning the drive

Step 3. Click the Scan button. During scanning, you can choose the type of files you want. You can also type in the filename in the search bar.

select the files you want to recover

Step 4. You can use the Preview button to ensure that those are the files you wish to retrieve. Once done, select the relevant files and click on Recover. You can also designate the location where you want the files recovered.

select the location for saving files

When the process concludes, all the selected files will appear at the desired location.

Free Download

For Windows XP/Vista/7/8/10/11

Free Download

For macOS X 10.10 or later


Summing it up, it's essential to know why you should look to convert MBR to GPT using cmd. You can proceed with the conversion if you run a new system and want to maximize storage utilization. On the other hand, sticking to MBR and keeping your data untouched can be ideal if you are still using an old system with light usage.