Skip to main content
Windows 10

Format write-protected USB drive in Windows 10

Sometimes when using USB storage devices like USB flash drives or portable hard drives, we get an error stating that the drive is write-protected. Due to this error, we are unable to make changes to the files it contains. Today we are going to see how to fix this error to be able to format the write-protected USB drive in Windows 10.


Write-protected USB error

Currently, almost no USB device has a physical write-protect mechanism. We can locate this as a small mobile device contact at either end of the device.

But if our storage unit does not have any of these buttons or contacts, the cause of this error may be the following:

  • A viable computer USB port failure: This is not the most common of course, to make sure we will put the device in another port and see if it produces the same error
  • Storage device failure itself: This cause is very likely and implies that we may have to throw away our USB memory in a short time. If the solutions we offer here do not work, it is viable that it cannot be used.
  • A viable bug in the system- This can be solved successfully with the help of this tutorial.

To know that this error has occurred in our unit we will not be able to copy files into it, we will not be able to format the drive storage or we will not be able to disassemble the unit of the equipment olChanges made are not saved.

The first identifies the error

To identify if the error is from the USB device itself or from the computer, what we will have to do is test our storage drive on another computer.

  • If the error recurs, the the reason is the physical storage drive
  • If the device works normally, the error will be located in our team It could be the operating system's fault or USB ports

For the latter case, we can test different USB ports to see if the error reoccurs. With this, we will be almost sure that the error is from the operating system. So, let's see what we can do about it.

Format write-protected USB drive with Diskpart

It can be him option with the best chance of success if we want to directly format a write-protected USB drive. For this process, we will do the following:

  • The first thing to do is run the command prompt or the Shell Power.
  • We press the key combination «Windows + X«To open the Start menu options
  • Among them, we identify that of «PowerShell (administrator)«We click for its execution


In the command window we write the following. (we have to press Enter every time we type the command to execute it)


With this we start the tool

With the USB key inserted we execute:

list disk

And a list of drives will appear on the screen. We need to identify which is our USB memory. To do this, you need to know the storage capacity of it.



select disk

We need to put the disk number that the above command listed as USB stick.

attributes disk clear readonly

With this command we will enable USB reading and writing

create partition primary

We create the new partition in the disk partition table.

Maybe you are interested >>>  How to convert a png image to jpg without losing quality


select partition 1

We select the newly created partition

format fs =

With this command we will format the USB memory. In the format we have to put «NTFS"If it is a large portable hard drive or"FAT32"OR"THICK“If it's a small removable USB key, like us. The most normal will be FAT32.


Next, we need to activate the partition and assign a letter to it:

assign letter =


With this method, we can format the USB drive.

Clear USB write protection with regedit

At the same time we will have some solutions through the Windows 10 graphical interface. It is possible that the error produced by the USB key is due to a incorrect system registry settings. As we always say, before touching the Windows registry, it is convenient that you take a look at some things that we should consider before starting to touch the Windows 10 registry.

To perform this procedure, we must follow the following steps:

Here two things can happen to us: that the value key does not exist, So that we will have to create it or that it really exists. In this circumstance, we will have a value called «Write protection«.

  • We will have to double click on this value and write a ««


If we haven't created it, we will need to create the value key.

  • For that, we right click on «Control«In the directory tree we went to before
  • Then we choose «New"AND"password"And we will call it:"StorageDevidePolicies«
  • Now we enter the new value key created and in the right part of the window right click on empty space.
  • We choose the option «New«»DWORD value (32 bits)
  • We assign the name «Write protection«


  • We open it with a double click and write inside a «"As in the previous case

Now we have to reboot the system and try to reinsert the storage drive inside. The error should have been corrected. Now we will be available to be able to format a write-protected USB drive.

  • For this we will have to go to «This team«And by right clicking on the USB key, we choose»Format…"
  • Now we choose the configuration that we see in the following image (or NFTS or FAT) and we begin.


In this way we will have our device formatted.

If the error persists, we can still do something else. In this circumstance, we will have to modify a series of Group Policies to try to correct the error.

Remove USB write protection with gpedit.msc


Now we will need to locate three group policies which are:

  • Will pray: Removable disks deny access at runtime
  • Second: Removable disks deny write access
  • Third: Removable disks deny read access


To modify them we double click on each one of them and we must choose the option «Disabled«


The next thing will be to format the device as in the previous section. Or if you wish, with DiskPart.

These are the possible ways in which we will have to format the write-protected USB drive in Windows 10.

Were you able to correct this error? If you couldn't, leave it in the comments and we'll explore new ways to try and fix it.

error: Attention: Protected content.