Remove Write Protection from a USB Drive Easily
Running into a “The disk is write-protected” error when trying to copy, delete, or edit files on your USB drive can feel frustrating, especially when you’re sure the drive was working fine before. Write protection is essentially a safety feature that prevents data from being modified, either intentionally or due to system-level restrictions. While it’s useful in controlled environments, it becomes a problem when you actually need to use your USB drive normally.
Whether the cause is a physical lock switch, corrupted file system, registry restriction, or disk attribute setting, there are multiple ways to remove write protection.
In this guide, you’ll walk through every reliable method, step by step, using a clean and practical approach that works on Windows 11, Windows 10, and even older versions.
Remove Write Protection from a USB Drive

To remove write protection from a USB drive, first check for a physical lock switch and disable it. If the issue persists, use DiskPart by opening Command Prompt as administrator and running the commands diskpart, list disk, select disk X, and attributes disk clear readonly. You can also remove write protection through Registry Editor by navigating to Computer > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > StorageDevicePolicies and setting WriteProtect to 0.
If none of these methods work, formatting the USB drive or using Disk Management can resolve the issue.
Let’s learn in detail!
1: Check the Physical Lock Switch on the USB Drive
Some USB drives and SD card adapters come with a physical write protection switch. If this switch is enabled, no software method will override it.
Start by unplugging your USB drive and inspecting its body carefully. Look for a tiny slider labeled Lock or Unlock. If it’s set to the locked position, move it to the opposite side.
After adjusting the switch, plug the USB drive back into your computer and try copying a file. If the error disappears, you’re good to go. If not, move to the next step.
2: Remove Write Protection Using DiskPart Utility
DiskPart is one of the most effective built-in tools for fixing write protection issues caused by system-level attributes.
Go to Start Menu > type Command Prompt > right-click on it > select Run as administrator.
Once the Command Prompt opens, type the following commands one by one and press Enter after each:
diskpart
list disk
select disk X
attributes disk clear readonly
Replace X with the number corresponding to your USB drive. You can identify it by checking the size listed under list disk.
After running these commands, type exit and close the window. Reinsert your USB drive and check if the issue is resolved.
3: Edit the Windows Registry to Disable Write Protection
If your system has a policy that enforces write protection, you can disable it through the Registry Editor.
Go to Start Menu > type regedit > press Enter.
Navigate to Computer > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control.
Look for a folder named StorageDevicePolicies. If it doesn’t exist, right-click on Control > select New > Key > name it StorageDevicePolicies.
Now, inside that folder, right-click on the right panel > select New > DWORD (32-bit) Value > name it WriteProtect.
Double-click WriteProtect and set its value to 0.
Click OK, close the Registry Editor, and restart your computer. Plug in your USB drive again and test it.
4: Use Disk Management to Reformat the USB Drive
If your USB drive is still write-protected, formatting it through Disk Management may fix file system corruption.
Go to Start Menu > right-click > select Disk Management.
Locate your USB drive in the list of disks. Right-click on it and choose Format.
Select a file system like FAT32 or NTFS, give it a name if you want, and click OK.
Keep in mind that formatting will erase all data on the drive. If the format option is grayed out, proceed to the next method.
5: Disable Write Protection Using Group Policy Editor
This method works for systems where administrative policies restrict removable storage.
Go to Start Menu > type gpedit.msc > press Enter. Navigate to Computer Configuration > Administrative Templates > System > Removable Storage Access.
On the right side, find Removable Disks: Deny write access and double-click it.
Set it to Disabled or Not Configured, then click Apply and OK.
Restart your system and reconnect the USB drive to check if the issue is resolved.
6: Scan the USB Drive for Errors
Sometimes, disk errors can trigger write protection behavior.
Go to This PC > right-click on your USB drive > select Properties. Navigate to the Tools tab > click Check under Error checking.
Follow the on-screen instructions to scan and repair the drive.
Once the scan is complete, try using the USB drive again.
7: Use Command Prompt to Fix File System Errors
You can also repair your USB drive using the CHKDSK command.
Go to Start Menu > type Command Prompt > right-click > select Run as administrator.
Type the following command:
chkdsk X: /f
Replace X with your USB drive letter.
This will scan and fix file system errors. Once done, eject and reinsert the drive to see if write protection is gone.
8: Format the USB Drive Using Command Prompt
If standard formatting fails, you can force format using DiskPart.
Go to Start Menu > type Command Prompt > Run as administrator.
Type the following commands:
diskpart
list disk
select disk X
clean
create partition primary
format fs=ntfs quick
assign
This completely resets the USB drive. After the process finishes, your drive should be writable again.
9: Check for Malware or Virus Restrictions
Malware can sometimes lock your USB drive to prevent file changes. Open your antivirus software and run a full scan of your system and the USB drive.
You can also use Windows Security by going to Settings > Privacy & Security > Windows Security > Virus & threat protection > Scan options > Full scan.
Remove any detected threats and reconnect your USB drive.
10: Update or Reinstall USB Drivers
Driver issues can sometimes cause incorrect read-only behavior.
Go to Start Menu > type Device Manager > open it. Expand Disk drives > right-click your USB device > select Uninstall device.
After uninstalling, unplug the USB drive and restart your computer.
Plug it back in, and Windows will automatically reinstall the drivers.
FAQs
Why is my USB drive suddenly write-protected?
This can happen due to corrupted file systems, incorrect registry settings, malware infections, or hardware-level protection. Sometimes, even improper ejection can trigger this behavior.
Can I remove write protection without formatting?
Yes, methods like DiskPart, Registry editing, and Group Policy changes allow you to remove write protection without losing data.
What if none of the methods work?
If none of the fixes resolve the issue, your USB drive may be physically damaged or permanently locked. In such cases, replacing the drive is usually the only option.
Is write protection a virus?
Not always. While malware can cause it, write protection is often a legitimate system or hardware feature.
