Some SD cards and USB sticks have write protection switches. When enabled they prevent files from being deleted, or any new files being written to the device. It also stops you from accidentally formatting the card or stick.

Occasionally, you’ll find that an SD card or USB flash drive will refuse to format and Windows will tell you that it is write protected, even though there is no switch, or the switch is set correctly to allow the device to be written to.

Typically, you can read the files which are already stored on the drive, but you can't delete them (they sometimes seem to delete ok, but the next time you check, there they are again!).

Here are a couple of ways you can try to format the drive and remove the write protection. Bear in mind that there is no guarantee that they will work for you: your USB flash drive or SD card may be corrupt or physically broken and no utility or low-level formatting tool will make it work again. The only solution in this case is to buy a new drive. (See also: Recover deleted files for free: recover lost data.)

How to erase a write-protected USB drive in the Registry using Regedit.exe


Navigate to the following key:



Regedit StorageDevicePolicies



Regedit new key


If this method doesn’t work, try the following:

Removing write-protection using Diskpart




Now, type the following, pressing Enter after each command:


list disk


attributes disk clear readonly


create partition primary




Add Jim to your Google+ circles and follow Jim and @PCAdvisor on Twitter.