Diskpart to Format USB Flash Drive Memory Card and Hard Disk Partition FAT32/NTFS/EXFAT/GPT

Once upon a time, a friend came to us with his flash drive raw in file system and asked whether there was a guide for using diskpart to format the drive. Here are some contents focusing on using diskpart to format drives.

Better and easier than diskpart? Why not free usb or disk format tools? [8 free]

Content Navi

How to Open Diskpart in Windows?

Diskpart command utility is able to work in Windows 2000, XP, Vista, 7, 8, 10. The methods to open Diskpart command vary, depending on different Windows platform.

1. Access Diskpart in Windows XP

Click "Start" button > "Run" > type "diskpart.exe" and press "Enter" button

run diskpart on windows xptype diskpart

Or you can click "Start" button on > "Run" > type "cmd" and press "OK" button > type "diskpart" and press "Enter"

2. Open Diskpart in Windows Vista/7/8.1/10

Click "Start" button > type "cmd" in the search bar > right click "cmd.exe" and choose "Run as administrator" > type "Diskpart" and press "Enter"

run diskpart windows

Or you may press Windows + X keys at the same time > select Command Prompt (Admin) > type type "diskpart" and press "Enter"

Diskpart to Format Hard Disk Partition or usb/SD

It does not matter which Windows operating system is running on your computer, you can follow the steps below to format an internal hard disk partition on Windows PC after running diskpart command:

Video - diskpart to format a drive

Step1. Type list disk and press Enter

list disk

Now, you will see a list of disk which shows all disks on your computer.

all disks

Step2. Select a disk that you want to format by type select disk 0 (e.g. you want to format disk 0) and press Enter.

select disk

Now, it will show a message saying disk 0 is now the selected disk.

disk is selected

Step3. Type list volume and press Enter button to show all volumes

list volume

Step4. Type format fs=ntfs label=volume label quick and press Enter to execute the format. (eg, 'format fs=ntfs lable=Local Disk quick')

Diskpart to format sd/usb/hdd fat32/exfat/ntfs? If you want to format the volume to FAT32 file system, you can type format fs=fat32 label=volume label quick (This shows diskpart to format volume fat32/ntfs/exfat). Here are options that you may use for different file systems.

  1. format D:/ fs=ntfs quick
  2. format D:/ fs=fat32 quick
  3. format D:/ fs=exfat quick

Or if you have already selected a volume at previous step, you may directly try:

  1. format fs=ntfs quick; or format fs=ntfs
  2. format fs=fat32 quick; or format fs=fat32
  3. format fs=exfat quick; or format fs=exfat

diskpart to format partition

Pay attention: Volume label refers to the label of the drive that you want to format, such as the image showing below. The volume label of the partition is "My Documents".

No label for volume? => you may try "format D: / fs=ntfs quick" when d is the drive you want to format; or you may simply use 'format fs=ntfs quick' when you have selected a volume at the previous steps.

When the format is completed, you will see message showing "Diskpart successfully formatted the volume"

diskpart format successfully

Or you may open your drive in Windows explorer and right click your drive, -> format

volume label

Also read: format fs=ntfs quick; format fs=fat32 quick;


Question: Shall I use list volume after list disk?

Answer: If there are more than 1 partition on your disk, we would recommend you add the step 'list volume' in the diskpart format command proccess. Usually it comes in order: list disk, list volume, select volume. And then your targeted drive or usb or sd would be selected for further operations.

Question: format fs=ntfs lable=volume lable? quick, what if there is no volume lable?

Answer: You may directly use "format fs=ntfs quick" without lable information when you have volume selected at the previous steps.

Question: Shall I use clean, create partition primary?

Answer: You may directly try 'format fs=ntfs quick' to see whether it work; if it failed, then you need to add the steps: clean, create partition primary in the steps.

Diskpart to Format GPT (in Windows or While Installing OS in Bios)

How to format disk gpt using cmd diskpart? Here are two parts, one to format disk from mbr to gpt using diskpart cmd in Windows 11/10/8/7; the other one is to format disk gpt from mbr in Bios while installing Windows. Be free to follow the following steps.

diskpart format disk gpt using cmdDiskpart format disk gpt using cmd

Video 1 - how to format disk from mbr to gpt using cmd diskpart

Video 2 - how to format disk mbr to gpt in bios during Windows installation

Diskpart Is Unable to Format - Write Protected

Diskpart may report it is unable to complete the format due to device write protected with readonly mode. Sometimes it could be caused by the end of life span of your device. You may try the following ways to see whether it may work, or your device is dying.

Pay attention: If none of the above method work for your device, it still reported write protected, then mostly your device is coming to the end of lifespan.

Diskpart Cannot Format Digital Device

PC failed to complete the format when you run Diskpart to perform formatting? This problem might result from any reasons. Below are some common messages you may receive when Diskpart failed to format a digital device:

1. Diskpart has encountered an error: Incorrect function. See the System Event Log for more information.

diskpart incorrect function

2. Diskpart has encountered an error: The device does not recognize the command. See the System Event Log for more information.

device does not recognize the command

When you get the similar error messages above, probably the Windows system does not has the ability to format the device with the Diskpart command line. You can open System Event Log to check the detailed issue and fix the problem.

3. It shows "There are no fixed disks to show"

no fixed disk

Usually, you may see this error message when you type list disk under Diskpart command. If you get this error message, probably the disk you want to format is corrupted and cannot be recognized by system.

==>> Diskpart failed to complete the format? please refer to: How to fix unable to format problem

Data Recovery after Diskpart Format or Clean

If you realize that you lose some important data after using Diskpart after cleaning or formatting USB drive, pen drive, external HDD, memory card or any device, you may use iCare Data Recovery to recover data after formatting.

Free Disk Drive/Memory Card Data Recovery Tool


Free Download Tool to Recover Data from Damaged Media, inaccessible drive, not formatted disk/usb/memory card.

Also read: file recovery from diskpart format

Last updated on Nov 28, 2023

Related Articles

Hot Articles

External Resource

Best File Recovery Software > Fix Errors > Diskpart to Format USB Flash Drive Memory Card Hard Disk Partition