How do I format a write-protected USB in Windows 10?

Formatting a write-protected USB drive can be tricky in Windows 10. A USB drive may become write-protected due to corruption, damage, or intentional lock by the manufacturer to prevent data loss. When a USB is write-protected, you cannot add, change or delete data on it. To use the USB drive normally again, you’ll need to remove write protection.

There are a few different methods you can try to format a write-protected USB drive in Windows 10. The steps will vary slightly depending on the specific reason your drive became write-protected in the first place.

What Causes a USB Drive to Become Write-Protected?

There are a few main reasons a USB flash drive may become write-protected:

  • The USB drive is intentionally set to read-only by the manufacturer. Some USB drives come with built-in write protection to prevent files from being deleted or the drive reformatted. There is often a physical lock switch on the USB drive housing that enables write protection.
  • The USB drive is corrupted. If the drive has become corrupted due to a virus, improper ejection, or physical damage, Windows may detect errors and automatically set the drive to read-only to prevent further damage.
  • The registry key controlling write access is corrupted. A corrupted registry key can incorrectly set a removable drive to read-only in Windows.
  • Write protection is enabled via group policy. System administrators can use group policy settings to set removable drives as read-only by default via the registry.

So in summary, USB drive write protection may be intentionally set by the manufacturer, enabled due to corruption, or set via group policy. The steps to format a write-protected drive will depend on the specific reason protection was enabled in the first place.

How to Remove Write Protection from a USB Drive

Here are the general steps to remove write protection from a USB drive in Windows 10:

  1. Check for a physical lock switch on the USB drive and disable it if present.
  2. Use DiskPart to clear the read-only attribute.
  3. Update or uninstall problematic USB drivers.
  4. Edit the registry key controlling write access for removable drives.
  5. Reset the USB drive by reformatting it.

Let’s look at each of these steps in more detail.

Check for a Physical Lock Switch on the USB Drive

Some USB drives have a small physical lock or tab that slides to enable write protection. Check the USB drive housing for a read/write lock switch. If present, slide the switch to the unlocked position.

This disables any hardware-level write protection set by the manufacturer. If the drive came with built-in write protection you cannot permanently disable, this physical switch will at least temporarily unlock the drive so you can access it in Windows.

Use DiskPart to Clear the Read-Only Attribute

DiskPart is a command line disk partitioning utility built into Windows. You can use it to remove the read-only attribute from your USB drive. Doing so may override any software write protection.

To use DiskPart:

  1. Connect the write-protected USB drive to your computer.
  2. Open the Start menu and type “diskpart”. Select the DiskPart app to launch it.
  3. In the DiskPart window, type “list disk” and press Enter. Note the disk number of your USB drive.
  4. Type “select disk x” where x is the disk number of your USB drive. Press Enter.
  5. Type “attributes disk clear readonly” and press Enter. This removes the read-only attribute.
  6. Type “exit” and press Enter to close DiskPart.

After clearing the read-only attribute with DiskPart, check if you are now able to add files to the USB drive.

Update or Uninstall Problematic USB Drivers

Outdated or corrupt USB drivers can sometimes cause write protection issues. Updating your USB drivers may clear any problems.

To update your USB drivers:

  1. Open Device Manager.
  2. Expand the Universal Serial Bus controllers section.
  3. Right click on your USB drive and select Update driver.
  4. Search automatically for updated driver software or browse your computer for the driver.
  5. Follow the onscreen prompts to install updated drivers.

If updating drivers does not work, uninstalling the USB drivers completely will force Windows to reinstall fresh copies on next connection. Make sure to disconnect and reconnect your USB drive after uninstalling drivers.

Edit the Registry Key Controlling Write Access

The Windows registry contains a key that controls write access for all removable drives. If this key becomes corrupted, it can incorrectly set your USB drive to read-only. Editing the registry can override this setting.

To edit the registry write access key:

  1. Open the Start menu and type “regedit”. Press Enter.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.
  3. In the right pane, double click on WriteProtect. Set the value to 0.
  4. Click OK and close the registry editor.

Restart your computer for changes to take effect. The USB drive should no longer be write-protected.


Editing the registry incorrectly can cause serious system issues. Make sure you follow the steps exactly and do not alter any other registry keys.

Reset the USB Drive by Reformatting It

If all else fails, reformatting the USB drive will wipe it clean and reset it to factory default settings. This should clear any write protection.

  1. Connect the write-protected USB drive to your computer.
  2. Open Windows Explorer and right-click on your USB drive.
  3. Select Format from the menu. Choose FAT32 or exFAT file system.
  4. Check the Quick Format box and click Start.
  5. Click OK on the warning prompt to reformat and erase all data.

After reformatting, the USB drive should no longer be write-protected. Just be aware this will erase all data on the drive.

Tips for Avoiding Write-Protected USB Issues

Here are some tips to avoid dealing with write-protected USB drives in the future:

  • Physically lock removable drives when possible. Use the lock switch on drives that support it when you need to prevent files from being changed or deleted.
  • Eject USB drives properly. Always use the Safely Remove Hardware icon in the system tray before unplugging a USB drive.
  • Check removable drives for errors. Use Windows’ error-checking tool regularly to scan for and fix errors.
  • Update your USB drivers and Windows regularly. Keeping your system updated can prevent driver issues from causing problems.
  • Handle USB drives carefully. Physical damage can lead to corruption and write protection.

Following best practices for using removable media can help prevent your USB drives from becoming mysteriously write-protected.


Write-protected USB drives can be frustrating, but the issue can usually be resolved. The key steps are:

  • Disable any physical lock switches on the USB drive.
  • Use DiskPart to remove the read-only attribute.
  • Update or reinstall USB drivers.
  • Edit the registry removable disk access key.
  • Reformat the USB drive.

With one of these methods, you should be able to remove write protection and reformat an uncooperative USB drive in Windows 10. Just be cautious when editing the registry and understand reformatting will erase data. Following best practices for using USB media can help avoid headaches down the road.