How to Format your Pendrive using CMD

For various purposes, you may often need to format pendrive using cmd. Usua...

By Norman Clark Updated

For various purposes, you may often need to format pendrive using cmd. Usually, this is quite a simple task. Moreover, there are various ways to proceed with it. But, using the Command prompt is one of the simplest to do that.

You have come to the right place if you want to know how to format pendrive using cmd. Also, you’ll find all the information related to this matter that would help you in the long run.

Formatting your Pendrive using Command Prompt:

First, you must connect the pendrive to your PC and make sure whether it’s recognised. Users often complain that their laptops don’t show any connection to the pendrive.

Once you succeed in connecting the pendrive, you must proceed with the following steps:

Step 1: Open the Command Prompt (CMD) in the System

To use the Command Prompt for formatting, you can open the CMD by click on windows start and search for cmd, you will find the Command prompt on the list. Then right-click on the cmd option and select “run as administration”.


If you have not admin account, then you must ask the owner to provide you with admin rights to proceed with this solution. Own the device but don’t have an admin account? In that case, you can provide an administrator role to your user account.

Step 2: Use the Diskpart tool

Various tools come pre-installed in your Windows system for performing various tasks. To format pendrive using cmd, you have to use the Diskpart tool. It is used for partitioning as well as formatting hard drives, both internal and external.


Moreover, it works better than many other tools for this purpose. To launch it, you need to enter the “Diskpart” in the Command Prompt. Now, you’re ready to proceed with the actual formatting process.

Step 3: Bring up connected drives

After launching Diskpart, you need to bring up a list of all drives detected on your device. For that, you have to enter “List Disk” in the field. It will list all the drives as Disk 0, Disk 1, and so on.

list disk command

So, you need to find your pendrive among them. Now, how do you do that? The storage size given along with the discs can help you identify the pendrive among them.

Step 4: Select the pendrive

select disk

Once you’ve found the pendrive, you need to select it for formatting. For that, enter “select disk” and add the disk number beside it. Let’s suppose your pendrive is listed as Disk 1. In that case, you need to enter “select disk 1” in the field.

Step 5: Clear the data

After you select the right disk, you have to clear all its data. So, you must not continue with this if you don’t want to lose the files. To proceed with this step, you need to enter “Clean” in the field. This will delete all forms of data from it.

Step 6: Make a partition

The next step is to form a partition in your pendrive. For that, you simply have to enter “Create partition primary” in the prompt.

Step 7: Choose the partition to format

Now, you need to choose one of the partitions to format. For that, enter “select partition” along with the partition number. So, this works the same way as selecting the disk. After choosing the partition, you need to proceed with formatting it.

clean, select and create partition

Step 8: Format to a file system if your choice

Before you proceed with the format, you must decide on the file system. There are various options you can choose from. Moreover, each of these has its advantages and drawbacks.

format fs command

You can decide to choose which format is best here? already have a preferred file system? Then, add it to the command “format fs=” and enter it. For example, if you want to format it to fat32, use “format fs=fat 32”.

Step 9: Assign a name to the drive

This is the last step of the formatting process. After the previous step, you need to assign a certain letter to the pendrive; suppose you want to name it K. In that case, you need to enter the command “assign letter k” in the field.

Once Diskpart completes this step, you’ve successfully how to format pendrive using CMD. So, you can exit the Command Prompt now.

Which File System should you use for Formatting?

The file system you format pendrive into, is an important consideration to make. If you haven’t decided and are wondering, none of them is suitable for all cases. Are you going to use the pendrive with Windows only? In that case, you must go for NTFS; otherwise, choose FAT32.

The latter system lets you use the pendrive with other major systems like Linux and Mac. Moreover, NTFS isn’t suitable for pendrives but only for much larger storage devices.

But, FAT32 has limitations on the file size, and you can store data in them. So, they pose a disadvantage if you want to store large files in the pendrive. How do you deal with this drawback in such a situation? You can opt for exFAT, which combines the benefits of the systems mentioned above.

Alternative Ways for Formatting USB Drives

Not all users may find the Command Prompt method simple. But, you can do it without any issue if you follow the instructions mentioned above. If you’re looking for other methods for formatting your pendrive, try out the following:

Way 1: Using the File Explorer

If you’re looking for an easier method, you should find this one suitable. Most users might prefer performing the format through File Explorer than other methods. After all, it may take less time and is simpler than other ways. So, if you don’t find the Command Prompt viable, proceed with the following steps.

Find your pendrive in the File Explorer: Connect your USB drive to your PC and open the File Explorer. Can’t see the external drive listed there? In that case, make sure that you’ve connected it properly to your PC. Right-click your pendrive when you see it and select the Format option.

Select the file system file you prefer: After you opt for formatting the drive, you’ll get the option to choose the file system. If you have a preference, select it from the options. In case you’re not sure which system to use, decide here before you proceed. Also, make sure the one you choose is best suited for your purpose. The options you get are FAT, FAT32 (default), NTFS, and exFAT. 

Select the optimal allocation size: Once you’re done with the file system, you need to allocate a proper space to it. Now, you can’t set the figure by yourself. Instead, you need to choose from among the various size options on the screen.

Name the pendrive: After you select the suitable size, you must set a name for the pendrive.  

Start the format: Once you’ve set all the suitable options, you’re ready to proceed with the formatting. Click on the Start button to begin the process and wait until it ends. Depending on the pendrive’s size, this may take a while to complete.

Should you enable Quick Format?

Wondering what the Quick Format option does? While enabled, it keeps certain important files on the pendrive after formatting it. So, you can retrieve them later with recovery software. If you don’t have any important files in the drive, you can uncheck the Quick Format.

Way 2: Format using the Disk Management

The File Explorer is a viable option for how to format pendrive. But, you may face various issues while using it. Many users report that File Explorer doesn’t detect their pendrives.

Are you facing this problem as well? In that case, you must try formatting it through Disk Management. For that, you must go to the Device Manager in the Control Panel.

Open your pendrive in Disk Management: You can find the Disk Management page on your device using the search bar. You’ll find all the drives connected to your device listed in there. If you didn’t find your pendrive in the File Explorer, you might find it here. So, select your pendrive to see all the partitions in it.

Choose the partition to format: Do you want to create a new partition in the drive? In that case, right-click the space listed there and opt for partitioning it. If you’re going to use an existing partition, you can click on any of the ones listed.

Do you want to format the entire space in your pendrive? You can do that by clicking each partition and opting to remove it. So, this method lets you proceed any way you want regarding this matter.

After you’re done with this step, it’s time to decide on the allocation of space.

Allocate the required space for formatting: Have you created a new partition? Sometimes, you might also find an unallocated space in your drive. In both these cases, you can choose to allocate any volume you want to. Unlike the previous method, you don’t need to choose between a given set of spaces. So, this method is more flexible than others in that regard. Enter any amount in the field below the minimum and maximum disk spaces.

Assign a letter and choose a file system: Like the previous methods, you need to name your pendrive with a letter. The next step is selecting a file system. Not sure about which one you must use? You must go for the one that serves your purpose the most. For that, you might want to know about various file systems first.

After optimising these settings, you need to set a few more — these include the volume label and the size of the allocation unit. Also, you can choose to enable or disable the quick format as well.

Do you have any files in the pendrive that you may need to retrieve later? In that case, you must enable the quick format. Otherwise, it’s not of any use to you, so you must disable it.

Proceed to format: Once you’re done with the above-mentioned steps, click on “Next” to go to the next step. You’ll see the options you choose, in the form of a summarised message, on the screen. Go through them to make sure whether you chose the right ones. If needed, you can also go back to change an option. Once you’re sure, click on “Finish” at the bottom to start format your pendrive.


You might need to use your USB drives with various devices. For that, it must have the right software which is compatible with the computer’s system. Otherwise, you may face a wide range of issues when you connect the pendrive. So, formatting is one of the best ways to improve its performance.

Moreover, it can solve the common issue that your computer faces in detecting the drive. Apart from that, formatting is also necessary for creating bootable media for your PC.