Attempting to format a USB thumb drive, external hard drive, or SD card through File Explorer in Windows 11 can suddenly fail with the generic alert: Windows was unable to complete the format. This error typically leaves the removable drive inaccessible, converted into a RAW file system, or displaying zero bytes of usable capacity. Because File Explorer relies on high-level formatting routines, minor partition corruption, bad sectors, or active system locks prevent it from initialising the volume.
Recovering the flash storage device requires dropping into low-level partitioning utilities such as Windows Disk Management and Diskpart to clear stubborn flags, rebuild the partition table, and assign a healthy file system.
Common Causes of USB Formatting Failures in Windows
When Windows cannot write a clean file allocation table (FAT32, exFAT, or NTFS) to removable media, the breakdown stems from several specific factors:
- File System Marked as RAW: Sudden removal of the flash drive during an active write sequence corrupts the partition header, preventing Windows from recognising existing volume boundaries.
- Read-Only or Write-Protection Flag: The flash memory controller or storage registry has locked the drive into a hardware write-protected state to protect existing data from degradation.
- Bad Storage Sectors: Physical NAND flash blocks have exhausted their program/erase (P/E) cycles, causing write verifications to fail during full formatting passes.
- Drive Letter Collisions or Ghost Partitions: Windows Disk Management assigned a conflicting volume label or hidden OEM partition that prevents Explorer from taking exclusive control.
Method 1: Clean and Rebuild Partitions with Diskpart
The command-line Diskpart utility bypasses the graphical limitations of File Explorer, allowing you to wipe partition headers and write a fresh master boot record (MBR) or GUID partition table (GPT).
- Insert the affected USB drive into a working USB port directly on the motherboard (avoid unpowered USB hubs).
- Press Windows Key + X and select Terminal (Admin) or Command Prompt (Admin).
- Type
diskpartand press Enter to launch the storage shell. - Execute the following commands in exact order:
list disk - Identify your USB drive number based on its storage size (e.g., Disk 2). Be extremely cautious not to select your internal Windows OS drive.
- Select the target disk:
select disk 2 - Clear any read-only attributes that might be preventing format writes:
attributes disk clear readonly - Wipe all existing partition data and hidden sectors:
clean - Create a fresh primary partition:
create partition primary - Perform a quick format to exFAT (for cross-platform support) or NTFS (for large files):
format fs=exfat quick(Alternatively, use
format fs=ntfs quickif intended exclusively for Windows systems.) - Assign an active drive letter and exit:
assign exit
Open File Explorer to verify that the USB volume appears normally with its full available capacity.
Method 2: Initialise and Format in Disk Management
If File Explorer fails but the USB flash drive is detected as an unallocated volume, use Disk Management to repartition it:
- Press Windows Key + R, type
diskmgmt.msc, and press Enter. - Scroll down the disk list to locate your removable drive.
- If the volume displays a black bar labeled Unallocated:
- Right-click the unallocated space and select New Simple Volume.
- Click Next on the setup wizard.
- Specify maximum volume size, assign a drive letter, choose FAT32 or exFAT, ensure Perform a quick format is checked, and click Finish.
- If the volume is labeled RAW or Healthy with an unreadable partition:
- Right-click the partition rectangle and choose Delete Volume.
- Once converted to unallocated space, right-click and create a new simple volume as detailed above.
Method 3: Scan and Repair Bad Blocks Using CHKDSK
If the drive controller is timing out due to logical sector corruption, run a targeted sector check prior to formatting:
- Open Terminal (Admin).
- Assuming your USB drive has been assigned drive letter
E:, run:chkdsk E: /f /r /x - Parameter breakdown:
/ffixes found structural file system errors./rlocates bad sectors and recovers readable information./xdismounts the volume first, forcing Windows to release any active background file locks.
- Allow the scan to reach 100 percent completion. If CHKDSK reports unrecoverable hardware I/O device errors, the NAND flash memory controller has permanently locked into read-only mode to prevent data loss, indicating that the physical drive has reached end of life and must be replaced.