A write-protected USB drive blocks every copy, delete, and format attempt with the same error: the disk is write protected. Before reaching for third-party software, the fix is usually a hardware switch, a stuck read-only flag, or a Registry value left over from an old policy, and you can clear any of those with either a free GUI tool or Windows’ own built-in commands. Here’s how to clear each one and format the drive once it’s writable again. Since a write-protected drive can usually still be read, copy anything important off it now before trying any of the fixes below, especially before Diskpart or formatting.

What Causes a USB Drive to Become Write Protected
A write-protected USB drive is not always broken. It usually means one setting or one worn-out cell is blocking writes.
- A physical lock switch on the drive itself is set to the locked position
- The
WriteProtectregistry value underStorageDevicePoliciesis set to 1 - The drive’s read-only attribute is set at the disk level instead of the file level
- The flash memory is old or worn out and the controller has forced it into read-only mode to prevent further data loss
Method 1: Check the Physical Lock Switch
Some USB flash drives and most SD cards have a small slider switch near the connector. Slide it away from the “Lock” position and reinsert the drive. This is the most common cause on SD cards and SD-to-USB adapters, and no software fix will work while the switch is locked.
Method 2: Use a Free GUI Tool (No Commands Needed)
If Command Prompt and Registry Editor aren’t something you want to touch, a free partition manager can clear write protection with a couple of clicks instead. EaseUS Partition Master’s free edition includes a dedicated Write Protection toggle for exactly this:
- Download and install EaseUS Partition Master, then open the Toolkit section
- Click Write Protection
- Select your USB drive from the list and click Disable
This works the same way Diskpart does under the hood, clearing the disk’s read-only flag, but without typing any commands. It’s a good starting point if Method 1 doesn’t apply and you’d rather not risk a typo in Diskpart or the Registry.
Method 3: Clear Write Protection With Diskpart
Diskpart is a built-in Windows tool that can clear a stuck read-only flag at the disk level.
Press Win + S, type cmd, then press Ctrl + Shift + Enter to open Command Prompt as administrator. Run the following commands one at a time:
diskpart
list disk
select disk X
attributes disk clear readonly
exitReplace X with the disk number of your USB drive from the list disk output. Picking the wrong disk number can wipe the wrong drive, so confirm the size shown next to it matches your USB drive before selecting it. Diskpart clears a software-level read-only flag; it cannot override a hardware lock switch or a drive that’s failing. Unplug the USB drive and reconnect it before testing whether you can write to it.
Method 4: Clear Write Protection Using Registry Editor
If Method 2 and Method 3 don’t resolve it, a Registry policy may be forcing all removable drives to read-only.
Open Registry Editor by pressing Win + R, typing regedit, and pressing Enter. Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePoliciesIf the StorageDevicePolicies key doesn’t exist, right-click Control, select New > Key, and name it StorageDevicePolicies. Inside it, create a DWORD (32-bit) Value named WriteProtect and set its value to 0. Close Registry Editor and restart the PC, then reconnect the USB drive.
Method 5: Format the Drive With Free Tools
If Method 2, 3, or 4 cleared the write protection, format the drive to finish resetting it: right-click the drive in This PC and select Format. If the drive still won’t format through Windows, or wasn’t fixed by the steps above, the file system itself may be corrupted rather than just flagged read-only, and two free tools handle that case:
- Rufus is an open-source formatting and bootable-USB tool that can force a low-level format on drives that Windows’ own formatter rejects
- HP USB Disk Storage Format Tool is a small freeware utility originally built for HP drives that also works on most standard USB flash drives, and can rebuild a corrupted file system that’s triggering false write-protect errors
Back up any recoverable files before formatting, since formatting erases the drive’s contents.
Frequently Asked Questions
Why does my USB drive say it’s write protected with no visible switch?
Most flash drives don’t have a physical switch at all. On those, the cause is almost always the WriteProtect registry value or a worn-out flash controller, so Method 2, 3, or 4 above is the place to start.
Can Diskpart damage my USB drive?
Diskpart itself won’t damage the drive, but selecting the wrong disk number and running disk-level commands against it can affect that other drive. Always confirm the disk size in list disk matches your USB drive first.
What if none of these methods remove the write protection?
If the physical switch is unlocked, Diskpart and the Registry fix don’t help, and formatting still fails, the flash memory itself has likely worn out or is failing, and the drive needs to be replaced.
Does formatting fix write protection for good, or can it come back?
Formatting only resets the file system; it doesn’t change whatever caused the write protection. If the cause was the registry policy or a stuck read-only flag, clearing that first (Method 2, 3, or 4) is what actually stops it from returning, and formatting afterward is just cleanup.
Is it safe to use Rufus or the HP USB Disk Storage Format Tool?
Yes, both are established, widely used freeware tools. Rufus is open source, and the HP USB Disk Storage Format Tool is a long-standing HP utility that also works on non-HP drives. Download them only from their official pages or a trusted mirror to avoid bundled installers.