How to Fix ‘Windows Was Unable to Complete the Format’ on USB/SD Card

Inserting a USB flash drive, external hard drive, or micro SD card into a Windows 11 or Windows 10 PC often prompts the dialogue: You need to format the disk in drive E: before you can use it. However, clicking ‘Format disk’ and starting the format wizard frequently halts with an error: Windows was unable to complete the format. The drive status changes to RAW in Disk Management, file transfers fail, and File Explorer reports the disk as inaccessible.

Fixing this format failure requires bypassing File Explorer restrictions by using the low-level Windows command-line utility Diskpart to clean partition tables, clear write-protection attributes, and format via raw volume controllers.

Why Does Windows Fail to Complete the Format?

Windows File Explorer formats storage volumes through high-level shell APIs that fail when encountering disk anomalies:

  • Read-Only Write Protection Attribute: The flash memory controller has engaged hardware write protection to protect degrading NAND flash, or the read-only flag is set in the partition boot record.
  • Corrupted Partition Tables (RAW Format): Interrupted write cycles left the drive’s Master Boot Record (MBR) or GUID Partition Table (GPT) unreadable by the Windows graphical format wizard.
  • Physical Bad Sectors in Boot Coordinates: The physical flash blocks designated for volume boot records (LBA 0) cannot be written to.
  • Active Process Lock: Antivirus real-time scanners, File Explorer indexing threads, or background applications holding exclusive volume handles.
  • Insufficient USB Hub Power: Inadequate electrical current causing the flash storage controller to disconnect during write-intensive zeroing operations.

Step 1: Format Using Diskpart Clean Command

Diskpart bypasses high-level shell locks by wiping the drive’s partition geometry directly:

  1. Press Windows Key + X and select Terminal (Admin) or Command Prompt (Admin).
  2. Launch the disk partitioning tool:
    diskpart
  3. List all physical drives connected to your computer:
    list disk
  4. Carefully identify your USB drive or SD card by its capacity (e.g. Disk 2 with 29 GB).
  5. Select your target disk:
    select disk 2
    (Caution: Verify the disk number matches your USB drive; selecting the wrong disk will erase your internal operating system drive.)
  6. Clear any hardware read-only flags:
    attributes disk clear readonly
  7. Completely wipe all partition tables and volume markers:
    clean
    Confirm the output reads: DiskPart succeeded in cleaning the disk.
  8. Create a brand-new primary partition:
    create partition primary
  9. Format the volume with a clean filesystem:
    format fs=ntfs quick
    (For USB drives smaller than 32 GB or cross-platform use on Mac/Linux, execute format fs=exfat quick instead.)
  10. Assign a drive letter:
    assign
  11. Type exit to close Diskpart. Open File Explorer to verify the drive is fully functional.

Step 2: Clear Write Protection via Windows Registry

If Diskpart clean returns an error stating The media is write protected, disable global storage write blocks:

  1. Press Windows Key + R, type regedit, and press Enter.
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
  3. If the StorageDevicePolicies key exists, look for a DWORD named WriteProtect in the right pane.
  4. Double-click WriteProtect and change its value data from 1 to 0.
  5. Click OK, restart your PC, and re-run the format procedure.

Step 3: Check Physical Write-Protect Switches on SD Cards

SD cards and micro SD card adapters feature a physical mechanical switch:

  1. Remove the SD card from your card reader.
  2. Inspect the left edge of the SD card casing.
  3. Look for the small sliding plastic tab marked LOCK.
  4. Ensure the switch is slid upward toward the brass contact pins (the unlocked position). If the slider is loose, tape it in the unlocked position.

Step 4: Run Check Disk (CHKDSK) on the Drive

If the volume contains bad sectors preventing format finalisation:

  1. Open Command Prompt as Administrator.
  2. Execute:
    chkdsk E: /f /r
    (Replace E: with your drive letter.)
  3. Allow the scan to repair filesystem links and remap physical bad blocks.

Step 5: Identify End-of-Life NAND Controller Lock

When flash storage drives reach their maximum program/erase (P/E) cycle limits or experience catastrophic memory chip failure, flash controllers lock permanently into read-only mode to prevent data corruption. If Diskpart clean fails with I/O device errors, the NAND flash has reached its end of life and the hardware drive must be replaced.

Get the best tech tips delivered straight to your inbox.

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