How to Remove Write Protection on a Micro SD Card

Unlock your adapter, or use diskpart or regedit to remove write protection

What to Know

  • If you’re using an SD card adapter, slide the write-protection switch from locked to unlocked. 
  • From command prompt: type diskpart, press enter. Type list disk, press enter ( make note of disk number).
  • Type select disk [disk_number] and press Enter. Then, type attributes disk clear readonly, and press Enter.

This article explains how to remove the write protection from a micro SD card.

How to Remove Write Protection From a Micro SD Card

Micro SD cards don’t have built-in physical write protection like full-sized cards, but micro SD card adapters do. If your micro SD card is in an adapter, and you’re seeing a write protection error, the first thing to do is eject the card and check the physical lock.

If the physical lock switch on your adapter is slid toward the back of the card, that means it’s locked. To remove write protection, slide the switch toward the front of the card where the metal contacts are.

Micro SD card adapters with the lock switch visible in two positions.

Jeremy Laukkonen / Lifewire

If your adapter is already unlocked, or you aren’t using an adapter, then the micro SD card itself is write-protected. To remove write protection, you can either use diskpart or make a change in the Windows Registry Editor.

Have you been using your SD card as internal storage on an Android? The card may have been modified to only work with that particular Android device. Try putting it back in your Android to retrieve your files or format it as external storage before you proceed.

How to Use Diskpart to Remove Write Protection From a Micro SD Card

Diskpart is a command-line tool, but you don’t need to be a Windows command prompt expert to use it. Just carefully type or copy and paste the commands from the following instructions, and don’t make any changes unless you’re sure you know what you’re doing.

Here’s how to remove write protection from a micro SD card using Diskpart:

  1. Open the Command Prompt.

  2. Type diskpart and press enter.

    diskpart highlighted in the command prompt.

    If prompted by User Account Control, click Yes.

  3. Type list disk and press enter.

    list disk highlighted in the command prompt.
  4. Locate your micro SD card in the list, and make note of the disk number, i.e. DISK 1.

    The disk number column highlighted in diskpart.

    If you aren’t sure which is the SD card, check the Size column and locate the one that matches the storage space of your SD card.

  5. Type select disk disk_number, replacing disk_number with the number you noted in the previous step, and press enter.

    select disk 1 highlighted in diskpart.
  6. Type attributes disk clear readonly, and press enter.

    attributes disk clear readonly highlighted in diskpart.
  7. Wait until you see the message Disk attributes cleared successfully.

    Disk attributes cleared successfully highlighted in diskpart.
  8. Type exit, and press enter to close Diskpart.

    Exit highlighted in diskpart.

How to Use Regedit to Remove Write Protection From a Micro SD Card 

You can also use the Windows Registry to remove write protection from a micro SD card through the Regedit utility.

Before you make any changes, make sure to back up your Windows Registry. Nothing should go wrong if you stick to making only the changes outlined below, but you need to be able to restore the registry if you do have unexpected problems or make an unintended change.

Here’s how to use regedit to remove write protection from a micro SD card:

  1. Open the Command Prompt, then Type regedit and press enter.

    regedit highlighted in the command prompt.
  2. In the Registry Editor, navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > StorageDevicePolicies.

    StorageDevicePolicies highlighted in the Registry Editor.

    If you don’t see StorageDevicePolicies, check the next section for instructions on how to add it.

  3. Right click WriteProtect and select Modify.

    Modify highlighted in the Registry Editor.
  4. Change the number in the Value data box to 0 and click OK.

    Value data highlighted in Registry Editor.
  5. Close regedit, and restart your computer.

What to Do If You Don’t See a StorageDevicePolicies Folder

If you don’t see a StorageDevicePolicies folder in the third step of the previous instructions, you’ll have to add it manually. This is also done in the Registry Editor, and you can continue right where you left off in the previous section.

Here’s how to add the StorageDevicePolicies key and WriteProtect DWORD value in the Registry Editor:

  1. Open the Registry Editor if necessary, and navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control.

    Control highlighted in Registry Editor.
  2. Right click any empty space in the right pane, and select New > Key.

    New and Key highlighted in Registry Editor.
  3. In the left pane, name the new key StorageDevicePolicies and press enter.

    StorageDevicePolicies highlighted in Registry Editor.
  4. With StorageDevicePolicies selected, right click any empty space in the right pane, and select New > DWORD (32-bit) Value.

    New DWORD (32-bit) Value highlighted in Registry Editor.
  5. Name the new value WriteProtect and press enter.

    WriteProtect highlighted in Registry Editor.
  6. Right click WriteProtect and select Modify.

    Modify highlighted in Registry Editor.
  7. Change the number in the Value data box to 0 and click OK.

    Value data highlighted in Registry Editor.
  8. Close regedit, and restart your computer.

What If I Can’t Remove Write Protection on a Micro SD Card?

If you're still having a problem with your micro SD card write protection after using any of the methods outlined above, the disk may be corrupt or it might be starting to fail. When SD cards have been written to and read from a certain number of times they’re automatically switched into write protection mode. The same thing happens if the card starts to fail.

When that happens, the card is permanently in write protection mode and you won’t be able to remove it. The only option is to back up all the data from the card while you still can, and then buy a new one.

In some cases, a micro SD card can also be locked down by a specific device. For example, setting an SD card as internal storage on an Android device can lock it to just that device. If that’s the case, then you can usually format the SD card using that device to remove write protection. Just make sure to back up the files first, because formatting the card removes all the files.

If you have a device with the ability to format a micro SD card, you can also try formatting your card with that device. In some cases, you’ll find that a device like a digital camera can format an SD card even when your computer can't.

FAQ
  • How do I remove write protection on a USB drive?

    To remove write protection on a USB drive, look for a lock switch and turn it to the off position. Alternatively, use the diskpart command, or change the WriteProtect value in the Windows Registry Editor to 0.

  • How do I write protect an SD card?

    Look for a physical lock switch on the SD card. Alternatively, use the diskpart command to choose your SD card and enter attributes disk clear readonly.

  • How do I erase everything on an SD card?

    To erase everything on an SD card in Windows, open File Manager, right-click your SD card, and select Format. On Macs, open Disk Utility, choose your SD card, and select Erase.

Was this page helpful?