How to Format write-protected USB Pen Drive (Simple Steps)

Write protection blocking you from formatting a USB drive? Here is how to format a write-protected USB flash drive in Windows.

You can format any pen drive, USB flash drive, or regular hard disk by selecting the “Format” option from the right-click context menu. If needed, you can even use commands to format a USB drive. However, if a USB drive is write-protected, Windows will show an error message as soon as you select the “format” option.

The exact error message on a write-protected disk is — “This disk is write-protected. Remove the write-protection or use another disk.”

disk is write protected error message

If you don’t know, write protection blocks data modifications on the disk, whether it is a USB pen drive, SD card, or a regular hard disk. This means you only have read access to the disk. You cannot write, modify, or delete data from a write-protected USB drive or SD card. Since formatting is the same as deleting data from a USB drive, Windows shows the “This disk is write-protected” error message.

Write-protection is an excellent feature to block accidental data modifications. For example, you can enable write-protection on your camera’s SD card so that the photos and videos are not accidentally deleted, formatted, or over-written.

The good thing is, when not needed, you can easily remove write protection on a USB drive or SD card—no need for write-protection removable software. There are multiple ways to do it. I will show three ways to disable write protection on a USB drive and format a write-protected USB drive. Follow the one you like.

Format Write-protected USB

Use one of the below methods to format a write-protect USB drive or SD card and fix the “disk is write-protected” error message.

  1. Toggle write-protect physical switch
  2. Diskpart command to remove write-protection
  3. Edit registry to format write-protected USB drive
  4. Group Policy to format write-protected USB drive

Important note: Before formatting, backup the data in the USB drive.

1. Toggle write-protect physical switch

Some SD cards and USB pen drives have a physical switch to turn on or turn off write protection. Generally, the switch will look like a slider and appears on the side of the drive. These drives are marked to show which way to slide the switch to disable write protection.

write protection switch on sd card
write protection switch on usb drive

Move the slider as indicated to unlock the drive. Once that is done, plug in the USB drive, open the File Explorer, right-click on the drive and select the “Format” option.

With that, the write-protected drive will be formatted.

2. Diskpart command to remove write-protection

You can use the Diskpart command to turn off write protection and format the drive. Here is how.

  1. Press the Start key on your keyboard.
  2. Search for “Command Prompt.”
  3. Right-click on “Command Prompt.”
  4. Select “Run as administrator.”
  5. Type “diskpart” and press Enter.
  6. Execute the “list disk” command.
  7. Type “select disk #” command. Replace # with disk number of the USB drive.
  8. Execute the “attr disk clear readonly” command.
  9. Type “exit” and press Enter.
  10. Close the CMD window.

The above action disabled write protection is disabled on the USB drive. You are now free to format the drive. Open the File Explorer, right-click on the USB drive, select “Format,” and click “Ok.” This action will Quick Format the selected drive.

With that, you have successfully formatted a write-protected disk in Windows.

3. Edit registry to format write-protected USB drive

You can modify a value called “WriteProtect” in the Registry Editor to turn off write protection and format the USB drive. Here is how.

  1. Press the Start key on your keyboard.
  2. Search and open “Registry Editor.”
  3. Paste “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control” in the address bar and press Enter.
  4. Right-click on the “StorageDevicePolicies” folder.
  5. Select the “New > DWORD value” option.
  6. Type “WriteProtect” as the value name.
  7. Double-click on the “WriteProtect” value.
  8. Set the Value Data to “0.”
  9. Click “Ok.”
  10. Close the Registry Editor.

Now, open the File Explorer, right-click on the write-protected USB drive, select the “Format” option, and click “Ok” to format it.

4. Group Policy to format write-protected USB drive

If you are running Windows 10/11 Pro or Enterprise edition, there is a particular policy called “Removable disks: deny write access.” Disabling this policy will turn off write protection to all removable disks connected to Windows OS. Here is how.

  1. Press “Windows key + R.”
  2. Type “gpedit.msc” and press Enter.
  3. Go to the “Computer Configuration > Administrative Templates > System > Removable Storage Access” folder.
  4. Double-click on the “Removable disk: deny write access” policy.
  5. Select the “disabled” option.
  6. Click “Ok.”
  7. Close the Group Policy Editor.
  8. Restart Windows.
format write protected usb drive

The above action disabled write protection on all USB drives.

Now, open the File Explorer, right-click on the write-protected USB drive, select the “Format” option, and click “Ok” to format it.

That is it. It is that simple to format a write-protected USB drive in Windows.

I hope that helps.

If you need any help, comment below.

Scroll to Top