Diskpart Format GPT: Step-by-Step Guide
This guide walks you through using Diskpart to format a disk and convert it to the GPT partition scheme on Windows. You’ll learn the exact commands to wipe a drive, create a GPT partition table, and format it with a file system, plus how to avoid common pitfalls. This is useful when installing Windows on a UEFI system, preparing a drive for a new OS, or fixing partition table errors.
What You’ll Need
- A Windows PC (Windows 10 or 11 recommended, but works on 7/8/Server).
- Administrator access to open Command Prompt or PowerShell.
- The target disk (internal or external) that you want to format. Warning: All data on it will be permanently erased.
- Backup of any important data on that disk before proceeding.
Step-by-Step
- Open Command Prompt as Administrator. Press Win+R, type
cmd, then press Ctrl+Shift+Enter. Click “Yes” when prompted by User Account Control. - Launch Diskpart. Type
diskpartand press Enter. The prompt changes toDISKPART>. - List all disks. Type
list diskand press Enter. Note the disk number of the drive you want to format (e.g., Disk 1). Be absolutely certain you pick the right one—the wrong disk will be wiped. - Select the target disk. Type
select disk X(replace X with the actual number) and press Enter. Diskpart confirms: “Disk X is now the selected disk.” - Clean the disk. Type
cleanand press Enter. This removes all partitions, volumes, and data on the selected disk, leaving it unallocated. Wait for “DiskPart succeeded in cleaning the disk.” - Convert to GPT. Type
convert gptand press Enter. This creates a GPT partition table on the disk. If the disk was already GPT, you may see an error—that’s fine; skip to the next step. - Create a partition. Type
create partition primaryand press Enter. This creates a primary partition that spans the entire disk. - Format the partition. Type
format fs=ntfs quickand press Enter. This formats the partition as NTFS with a quick format. For a different file system, replacentfswithfat32orexfat(e.g.,format fs=fat32 quick). - Assign a drive letter. Type
assignand press Enter. This gives the partition the next available drive letter so you can access it in File Explorer. - Exit Diskpart. Type
exitand press Enter, then close the Command Prompt.
Common Mistakes
- Selecting the wrong disk. The most serious error—you can wipe your system drive. Always double-check the disk number against its size in
list disk. - Skipping the
cleanstep. If you don’t clean first, the disk may still have an MBR or existing partitions, causingconvert gptto fail. - Using
formatbefore creating a partition. You must create a partition first; otherwise, Diskpart reports “There is no volume selected.” - Forgetting the
quickparameter. Without it, the format performs a full format, which can take hours on large drives. - Assuming GPT is always required. GPT is needed for UEFI boot and disks over 2 TB, but older BIOS systems may require MBR. Check your system’s firmware mode.
Tips
- Use
detail diskafter selecting a disk to verify it’s the correct one (shows disk ID, type, and size). - For a Windows installation drive, you may want to create a small EFI system partition and a separate Windows partition. Use
create partition efi size=100andcreate partition primaryafter that. - If you need to format an external drive for compatibility with Mac and PC, choose
exfatinstead of NTFS. - Always back up data before using
clean—there’s no undo.
Troubleshooting
- “The specified disk is not convertible” error. This usually means the disk has partitions that need to be removed. Run
cleanagain, then retryconvert gpt. - “DiskPart has encountered an error: Access is denied.” You’re not running as administrator. Close and reopen Command Prompt with admin rights.
- Disk 0 is the system disk and you can’t clean it. Windows protects the system drive. You can’t format the active system disk while Windows is running. Use a Windows installation USB and boot from it, then use Diskpart from the recovery environment.
- Format fails with “The volume is in use.” Close any programs that are using the drive (e.g., file explorer windows, backup software). If it persists, run
cleanagain and try formatting after reassigning. - After
convert gpt, the disk shows as unallocated in Disk Management. That’s normal—you need to create a partition and format it, as shown in steps 7-9.
Frequently Asked Questions
What does Diskpart format GPT mean?
It means using the Diskpart command-line tool to wipe a disk, convert its partition table to GPT (GUID Partition Table), and then format the resulting partition with a file system like NTFS. This prepares the disk for use with UEFI systems or large capacities.
Can I convert a disk to GPT without losing data?
No, the convert gpt command requires a clean (empty) disk. If you need to keep data, you must back it up first, then restore it after the conversion.
Is GPT better than MBR?
For modern systems, yes. GPT supports disks larger than 2 TB, allows more than four primary partitions, and includes redundant partition table copies for better reliability. MBR is only needed for very old BIOS systems or legacy compatibility.
What file system should I use when formatting?
For Windows system drives, use NTFS. For external drives that need to work with Mac and Windows, use exFAT. For small USB drives or compatibility with old devices, FAT32 is acceptable, but it has a 4 GB file size limit.
How do I know if my disk is GPT or MBR before formatting?
In Diskpart, after selecting the disk, type detail disk. The output shows “Partition Style: GPT” or “Partition Style: MBR.” You can also check in Disk Management by right-clicking the disk and selecting Properties, then the Volumes tab.
What if I accidentally formatted the wrong disk?
Stop using the disk immediately. Data recovery software may recover some files, but there’s no guarantee. This is why it’s critical to double-check the disk number and back up important data before running clean.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.