How to Format USB Drive in Command Prompt in Windows 11/10/8/7?

How to format USB drive in Command Prompt? This article gives a detailed tutorial. Moreover, you can know a free partition manager that helps you to format USB drive more easily.

Posted by @Emily July 24, 2024 Updated By @Emily May 12, 2023

User case

“Hi, guys. I am unable to format 32GB Simple tech USB Flash drive. The formatting process starts as usual, towards the end “Windows cannot format USB flash drive" and everything stops. Open Disk Management, click Format, but same result. What else can I do? Any help will be greatly appreciated.”

Usually, you can format USB drives in Disk Management and File Explorer easily. However, like the user above, sometimes you cannot finish the formatting operations as expected. That might be caused by USB drive read only, virus attack, USB corrupted bad sectors, or other unknown factors.

How to format USB drive in Command Prompt?

When you fail to format USB drive in Windows Disk Management or File Explorer, you can format USB drive through Command Prompt. Also known as CMD, cmd or cmd.exe, the Command Prompt is a command-line interpreter application in most Windows operating systems. You can use it to execute some commands to manage the disk partition in Windows computer.

Attention: Formatting will delete all data stored on the USB drive, so ensure you have backed up any required files in advance.

Step 1. Launch and run Command Prompt as Administrator: Click the “Start” button and enter “cmd” in the search box; then right-click “Command Prompt” and select “Run as Administrator”.

Step 2. Then type “Diskpart” and press “Enter” to launch Diskpart to format USB drive.

Step 3. In the subsequent window, type the following commands one by one, and press “Enter” after each one.

list disk: all disks on your computer will be listed along with a number. ● select disk #: # is the number of the USB drive ● clean: all data on the selected disk will be cleaned. ● create partition primaryselect partition 1format fs=ntfs quick: you can replace ntfs with fat32 or exfat when necessary. ● assign letter f: give the formatted partition with a specific drive letter. Then you can access it from Windows File Explorer.

Format write protected USB using CMD: If your USB drive is set into read-only mode, you need to add command “attributes disk clear readonly” to remove read only properties between “select disk #” and “clean” commands to format write protected USB using Command Prompt.

Free Alternative to Command Prompt: format USB drive easily

After looking through the steps on how to format flash drive in Command Prompt, you might worry that important data might get lost if you input a wrong disk or partition number during the process, or you might have received an error message saying “The volume is too big for FAT32” when trying to format an over 32GB drive to FAT32. Thus, you can switch to free partition software: AOMEI Partition Assistant Standard. This freeware works well on all versions from Windows XP to Windows 10.

More advanced than Command Prompt, it has below advantages: Designed in a clear and user-friendly interface, allowing you to easily choose the right drive to format. Format large hard drive (64GB/128GB/256GB and more) to FAT32 in Windows successfully. Format partition to Ext4/3/2 under Windows environment for Linux operating system. Format internal hard drive to exFAT easily and effectively. Format hard drive which becomes write-protected due to corrupted file system.

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

Step 1. Free download AOMEI Partition Assistant Standard, install and run it on Windows computer. Right click the USB drive and choose “Format Partition”.

Step 2. In the pop-out mini window, you can choose a proper file system for your needs. Then click “OK” to proceed.

Step 3. Back to the main interface, click “Apply" to commit the pending operation.

Note: if you are interested in Command Line partitioning hard disk, you can upgrade to AOMEI Partition Assistant Professional.

Summary

With this detailed guide, you are sure to know how to format USB drive in Command Prompt. If you want to format USB drive more easily and flexibly, AOMEI Partition Assistant is a better choice. Besides, the Pro edition provides more advanced functions, such as migrating OS to SSD, allocating free space from one partition to another, recovering deleted partitions and more. If you want to format USB drive and manage disk partitions conveniently on Windows Server computer, AOMEI Partition Assistant Server worth your trying.