Why Windows Cannot Format USB Drive: Causes & Fixes
In this article
Windows cannot format a USB drive usually because the drive is write-protected, the partition table is damaged, the file system is corrupted, or another program is holding a lock on the drive. The fix ranges from flipping a physical write-protect switch to using Diskpart or the official manufacturer tool. Below is a step-by-step guide to diagnose and resolve the problem, with clear explanations of what each step does and why it matters.
What You'll Need
- A Windows PC (Windows 10 or 11; steps are similar on Windows 8.1 but labels may differ slightly).
- The USB drive you want to format.
- Administrator rights on the PC (you will need to open Command Prompt as administrator for some steps).
- Optional: a small screwdriver if your USB drive has a physical write-protect switch that is stuck.
- Optional: the official formatting tool from the USB drive manufacturer (e.g., SanDisk, Kingston, Samsung) if available.
Step-by-Step
- Check for a physical write-protect switch. Some USB drives and SD card adapters have a tiny switch on the side. Move it to the unlocked position. If the switch is broken or missing, the drive may be permanently write-protected; in that case, skip to step 8.
- Close any program that might be using the drive. File Explorer windows, backup software, antivirus scans, or cloud sync tools can lock the drive. Close them all, then try formatting again via File Explorer: right-click the drive in This PC, choose Format, pick a file system (FAT32 or exFAT for most USB drives), and click Start. If you see an error like "Windows was unable to complete the format," continue.
- Open Command Prompt as administrator. Press Windows key + S, type cmd, right-click Command Prompt, and choose Run as administrator. Accept the User Account Control prompt.
- Use Diskpart to clear write protection. In the Command Prompt window, type
diskpartand press Enter. Then typelist diskand press Enter. Identify your USB drive by its size (be careful not to pick your system disk). Typeselect disk X(replace X with the USB drive number) and press Enter. Then typeattributes disk clear readonlyand press Enter. Typeexitto leave Diskpart. This removes the read-only flag that Windows may have set. - Check the drive's health with Disk Management. Right-click the Start button and choose Disk Management. Look for your USB drive in the lower pane. If it shows as "RAW" or "Unallocated," the partition table is damaged. Right-click the drive and choose Delete Volume (if available), then right-click the unallocated space and choose New Simple Volume. Follow the wizard to create a new partition and format it. Warning: this erases all data on the drive.
- Try formatting with Diskpart. Open Command Prompt as administrator again, type
diskpart, thenlist disk,select disk X(your USB drive), andclean. Thecleancommand wipes the drive's partition table. Then typecreate partition primary,format fs=fat32 quick(orfs=exfatfor larger drives), andassign. Typeexitwhen done. This is a more forceful format that often succeeds when File Explorer fails. - Use the manufacturer's tool. If the drive is from a known brand, download the official formatting utility from the manufacturer's website (e.g., SanDisk RescuePRO, Kingston Format Utility). These tools can sometimes revive drives that Windows cannot handle. Do not use third-party tools from untrusted sources.
- Check for hardware failure. If none of the above works, the drive may be physically failing. Try the drive on another PC or with a different USB cable/adapter. If it still cannot be formatted, it is likely dead and should be replaced. Do not attempt to open the drive casing unless you know what you are doing; doing so may void the warranty.
Common Mistakes
- Formatting the wrong disk. In Diskpart or Disk Management, always double-check the disk number and size before running
cleanor deleting a volume. Selecting your system disk will erase Windows. - Ignoring the physical switch. Many users jump to software fixes before checking the tiny write-protect switch on SD card adapters or some USB drives.
- Using quick format when the drive is failing. A quick format only rewrites the file system; if the drive has bad sectors, a full format (uncheck "Quick Format" in the Format dialog) may mark them and extend the drive's life slightly, though it takes much longer.
- Assuming the drive is dead too early. A corrupted partition table can make a drive appear dead, but Diskpart's
cleancommand often revives it. - Downloading unofficial tools. Avoid "free format tools" from unknown sites; they may contain malware. Stick to Windows built-in tools or the manufacturer's official software.
Tips
- Before formatting, back up any data you can still read from the drive. Formatting erases everything.
- For USB drives larger than 32 GB, use exFAT instead of FAT32. Windows' built-in format tool may not offer FAT32 for large drives; you can use Diskpart with
format fs=fat32 quickbut it may fail on drives over 32 GB. ExFAT is more practical. - If you need FAT32 for compatibility (e.g., with older devices), use a trusted third-party tool like FAT32 Format (guiformat) from a reputable source, but be aware of the risks.
- Keep your USB drive away from physical damage and extreme temperatures; hardware failure is a common reason for formatting problems.
- Regularly back up important data from USB drives; they are not designed for long-term archival storage.
Troubleshooting
- "The disk is write protected" error: Follow steps 1 and 4 above. If the error persists, the drive's controller may be locked; try the manufacturer's tool or replace the drive.
- "Windows was unable to complete the format" error: This often indicates a corrupted file system or bad sectors. Try Diskpart clean (step 6) or a full format (uncheck Quick Format).
- Drive shows as "RAW" in Disk Management: The partition table is damaged. Use Diskpart clean (step 6) to rebuild it.
- Drive not recognized at all: Check the USB port, cable, and try another PC. If it still isn't recognized, the drive is likely dead.
- Format option greyed out in File Explorer: The drive may be write-protected or in use. Close all programs and try Diskpart.
- Diskpart clean fails with "Access denied": Ensure you are running Command Prompt as administrator. If the drive is still locked, try restarting the PC and repeating the steps.
Frequently Asked Questions
Why does Windows say the disk is write protected when there is no switch?
Some USB drives have a write-protect flag set in their firmware or by a previous formatting attempt. Use Diskpart's attributes disk clear readonly command (step 4) to remove it. If that fails, the drive may be permanently locked.
Can I format a USB drive that shows as RAW?
Yes, but you will lose all data. Use Diskpart to clean the drive and create a new partition (step 6). If the drive has physical damage, formatting may not be possible.
What file system should I choose for a USB drive?
Use exFAT for drives larger than 32 GB and for compatibility with both Windows and macOS. Use FAT32 for smaller drives or if you need compatibility with older devices like car stereos or printers. NTFS is fine for Windows-only use but may not work on other devices.
Is it safe to use Diskpart?
Yes, if you are careful to select the correct disk. Diskpart is a powerful built-in Windows tool. Always double-check the disk number and size before running commands like clean.
Why does formatting fail even after using Diskpart clean?
The drive may have bad sectors or a failing controller. Try a full format (not quick) or the manufacturer's diagnostic tool. If those fail, the drive is likely beyond repair.
Can I recover data from a USB drive that Windows cannot format?
If the drive is recognized but cannot be formatted, data recovery software might help, but only if the drive is not physically damaged. Stop using the drive immediately and consult a professional if the data is critical.