How to erase a write-protected USB drive or SD card

If you’re stuck with a USB drive or SD card that can’t be formatted and to which you can’t copy any files, here are a few methods you can try to remove write protection and erase or format it.

By


  • 1
  • 2
  • 3
  • 4
  • More stories
Next Prev

Step 1 of 4:

How to erase a write-protected USB drive or SD card: Summary

To format a USB drive or SD card you may first need to remove the write protection, which is possible by tweaking commands in the Windows Registry. In this article we offer a step-by-step guide on how to erase a write-protected USB drive or SD card.

How to erase a write-protected USB drive or SD card: Step-by-step guide

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.)

Next Step »

Next Prev slideshow image

How to erase a write-protected USB drive or SD card: Summary

To format a USB drive or SD card you may first need to remove the write protection, which is possible by tweaking commands in the Windows Registry. In this article we offer a step-by-step guide on how to erase a write-protected USB drive or SD card.

How to erase a write-protected USB drive or SD card: Step-by-step guide

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.)

Step 2 of 4:

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

In any version of Windows from XP onwards, run Regedit.exe (searching regedit will usually show the program at the top of the list).

Navigate to the following key:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\

CurrentControlSet\Control\StorageDevicePolicies

Double-click on the WriteProtect value in the right-hand pane of Regedit.exe. Change the Value data from 1 to 0 and click OK to save the change. Close Regedit and restart your computer. Connect your USB drive again, and you should find it is no longer write protected. You can now format the drive as normal by right-clicking on it in My Computer and choosing Format.

Step 3 of 4:

If you can’t find StorageDevicePolicies, you can try creating a key by right-clicking in the white space in the Control folder and choosing New -> Key and carefully entering the name.

Now double-click on the new key (folder) and right-click once again and choose New -> DWORD. Name it WriteProtect and set its value to 0. Click OK, exit Regedit and reboot your computer.

If this method doesn’t work, skip to the next step.

Advertisement. Article continues below

Step 4 of 4:

Removing write-protection using Diskpart

With your USB drive plugged in, launch a command prompt. Do this by searching for cmd.exe in the Start menu (or Start screen in Windows 8). In Windows XP, click Start then Run, and type cmd.exe in the box.

NOTE: you may need to run Cmd.exe with administrator privileges if you see an “access is denied” message.

To do that, right-click on the shortcut and choose Run as administrator. In Windows 8, simply choose Command prompt (admin).

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

diskpart

list disk

select disk x (where x is the number of your USB flash drive – use the capacity to work out which one it is)

attributes disk clear readonly

clean

create partition primary

format fs=fat32  (you can swap fat32 for ntfs if you only need to use the drive with Windows computers)

exit

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

Advertisement

Should I upgrade to Windows 10? Why upgrade to Windows 10? Is Windows 10 good? The pros and cons of!…

1995-2015: How technology has changed the world in 20 years

This Uplifting Animation Celebrates Team GB’s Road to Rio

How to use Apple Music in the UK: Complete guide to Apple Music's features, including new features…