How to Fix ‘Windows Was Unable to Complete the Format’ on USB Drives

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).

  1. Insert the affected USB drive into a working USB port directly on the motherboard (avoid unpowered USB hubs).
  2. Press Windows Key + X and select Terminal (Admin) or Command Prompt (Admin).
  3. Type diskpart and press Enter to launch the storage shell.
  4. Execute the following commands in exact order:
    list disk
  5. 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.
  6. Select the target disk:
    select disk 2
  7. Clear any read-only attributes that might be preventing format writes:
    attributes disk clear readonly
  8. Wipe all existing partition data and hidden sectors:
    clean
  9. Create a fresh primary partition:
    create partition primary
  10. Perform a quick format to exFAT (for cross-platform support) or NTFS (for large files):
    format fs=exfat quick

    (Alternatively, use format fs=ntfs quick if intended exclusively for Windows systems.)

  11. 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:

  1. Press Windows Key + R, type diskmgmt.msc, and press Enter.
  2. Scroll down the disk list to locate your removable drive.
  3. 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.
  4. 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:

  1. Open Terminal (Admin).
  2. Assuming your USB drive has been assigned drive letter E:, run:
    chkdsk E: /f /r /x
  3. Parameter breakdown:
    • /f fixes found structural file system errors.
    • /r locates bad sectors and recovers readable information.
    • /x dismounts the volume first, forcing Windows to release any active background file locks.
  4. 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.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.