How to Remove Write Protection from Removable Drives?
Cannot format USB drive write protected? This article is a guide to get rid of write protection and learn how to format write protected USB on Windows 11, 10, 8, and 7 using compand promt without the need for any software.

What is write protection?
Think of write protection as a fortress wall. If data can come out but nothing goes in, your digital treasures remain untouched by accidental deletions or viral invaders.
When a USB drive or SD card wears this invisible armor:
You can read everything stored within
But nothing new enters its domain
No editing, creating, deleting or formatting is permitted
The device becomes a one-way street, content flows out, but nothing flows in.
Facing the “Cannot format USB drive: Write protected” message in Windows?
Solution 1
It’s obvious but sometimes you might miss this. Alwawys look for a physical switch on the device.

Examine your write-protected USB drive or SD card for a small sliding switch along its edge.
If present, this physical lock is your simplest solution,
Locate the tiny switch (usually on the side of the device)
Slide it to the “unlock” position
Your USB drive should now accept formatting through Windows Disk Management
Once unlocked, the write protection barrier disappears, allowing normal access to format, edit, or modify your drive’s contents.
Solution 2
Remove Write Protection via Diskpart
When your USB drive lacks a physical lock switch, Diskpart commands can clear write protection through software. Follow this method to regain control:
⚠️ WARNING: This process erases all data! Back up important files before proceeding.
Open the command prompt:
Press Windows + R and type CMD and once you are in the Command Prompt type dikpart and hit enter.
(Or Type “diskpart” in Run and hit Enter)
Enter these commands sequentially (press Enter after each),
list disk
select disk n (replace “n” with your USB drive number – the volume size should match your drive size)
attributes disk clear readonly
After completing these commands, try formatting your USB drive again through normal methods.
This approach bypasses software-based write protection by directly modifying the drive’s attributes at system level.
Solution 3
Even after using diskpart to remove readonly mode, the USB drive prompts you to format it when plugged in? Upon attempting to format, it says “The disk is write-protected.”? Well here is what you need to do.
Root Cause & Advanced Fix for Write-Protected USB Drives
If your USB remains write-protected, these underlying issues might be responsible:
Corrupted boot sector or partition table
Lingering boot loader or ISO protection flags
Windows partition detection failures
Complete Solution
Launch Command Prompt as Administrator
Execute these commands in sequence:
diskpart
list disk
select disk X (replace X with your USB drive number)
clean
create partition primary
select partition 1
format fs=ntfs quick
assign
exit
After completing these commands, safely eject your USB drive
Reconnect it to your computer – it should now function properly with write protection removed
This procedure completely rebuilds the partition structure, eliminating any write-protection flags that might be embedded in the filesystem.
Quick Troubleshooting Table For Quick Fix
Problem | Likely Cause | Solution |
---|---|---|
USB prompts to format after readonly removal | Corrupted partition table or leftover bootloader flags | Use diskpart : clean , create partition primary , select partition 1 , then format fs=ntfs quick |
DiskPart asks to “select volume” when formatting | Partition was created but not selected before formatting | After creating partition, run select partition 1 before format fs=ntfs quick |
USB still readonly after DiskPart and formatting | Controller protection triggered by ISO burning or flash memory issues | Use HDD Low Level Format Tool to perform a complete low-level format |
USB remains permanently readonly even after low-level formatting | Controller hardware lock due to wear-out or manufacturing fault | Identify USB VID/PID using ChipGenius → Search for controller-specific recovery tool (e.g., Phison MPALL, AlcorMP) |
Bootable USBs often get corrupted after use | Flashing tools overwrite partition tables and boot sectors | Always use “ISO mode” flashing; after use, wipe using DiskPart or Low-Level Format |
Hope this help you to fix your issue.
Thanks for stopping by. Good Luck!