You've finished work for the day. The only thing left to do is stick the files onto a USB flash drive. Then you get this message: "The disk is write-protected. Remove the write protection or use another disk." You immediately pull your hair out. This is your USB stick; you should be able to read, write, and do whatever you want with it!

Okay, you didn't pull your hair out. You stayed nice and calm. But you definitely need to get your USB drive fixed. Luckily, there are a few simple steps to fix write protection on a USB drive. It's just technology. You can fix it.

1. Check the USB Stick for Viruses

Every time you plug a USB drive into your computer, you should automatically scan it for viruses, especially if you have used it on a computer you don't own or a public computer.

Viruses often fill your USB drive with nonsense files, which can make your USB drive respond with the Write Protected error.

Depending on your antivirus software, you may be able to configure it to scan a USB drive when first plugged in automatically. If not, you can navigate to the USB drive in Windows Explorer, right-click, and force a manual antivirus scan.

Scan USB Drive With Windows Defender

If you do find a virus, eliminate it using your antivirus software. At this point, I would advise performing a full system scan after updating your virus definitions. If one virus lurks on your USB drive, you never know what might be propagating on your main system.

2. Check the USB Drive Body

Normally I'd make something this simple the first step. However, I'd rather see you protected from a virus instead of starting with the simpler fixes. Some USB sticks have a mechanical switch on them that puts them into Write Protect mode. This can be a very small slider switch that may have caught on something in your pocket or computer case.

USB Flash Drive With Write Protection Switch
Image Credit: Netac/Amazon

If this is the situation, simply move the switch to the unlocked position and copy the files again. Luckily, there aren't a lot of newly manufactured USB sticks with these locks on them anymore.

3. Check to Make Sure the USB Stick Isn't Full

You may see the Write Protected error message if your USB stick is full.

Open Windows Explorer, and browse to This PC. This gives you an overview of all drives connected to your system. Right-click your USB drive and select Properties. You'll be presented with a delightful donut chart (what was wrong with the venerable pie chart, Microsoft?) displaying your current drive capacity.

USB Drive Properties

As you can see, I've got room to spare. But if your USB drive is completely full, it can return a Write Protection error message.

4. Double-Check Drive Permissions

While we're in the disk properties window, let's make sure you have sufficient permissions to write to the drive.

  1. To recap, go to File Explorer > This PC, right-click your USB drive, and select Properties.
  2. Switch to the Security tab, check the permissions for the group, or use the name called Everyone, and make sure you see a checkmark next to Write.
  3. If you don't see that checkmark, select Everyone, click the Edit button, check the box next to Write in the Allow column, and click OK.
USB Drive Properties Security Write Permission

If you don't see the Security tab in the USB drive properties window, your drive is most likely formatted with the FAT32 or exFAT file system.

5. Remove Individual Files With Write Protection

Sometimes a single file can upset the balance. Perhaps one file is marked "read-only" and refuses to be deleted from the drive. This causes an entirely different error message, but it can be off-putting, nonetheless.

Browse to your USB drive, and locate the offending file. Right-click and select Properties. At the bottom of the panel, under Attributes, ensure Read-only is unchecked.

File Properties Read Only

Sometimes single filenames become corrupted. In addition, long filenames are an inherited Windows feature ingrained in the MS-DOS architecture. The long and short of it is that if a filename exceeds 255 characters, you're going to have a bad time.

To delete files with long filenames, we'll need the command prompt, as Windows Terminal and PowerShell don't support the necessary DOS command.

Here's how to do so:

  1. Press Windows + R, type cmd, and hit Enter or click OK.
  2. In the command prompt, enter the path to the directory that contains the affected file and hit Enter. I entered D: to navigate to our USB drive.
  3. Type dir /x and hit Enter to list all files in that directory, along with their short names. If you have a long list of files, try dir /x /p, which will pause the list to show you one screen at a time.
  4. Type del followed by the short name of the affected file and hit Enter to delete it. I entered dir WETALS~1.TXT to delete my test file.
A command prompt window listing directory files using dir /x command.

If you find that you can't delete a file because it's locked, you can unlock it or force remove it in a few different ways.

6. DiskPart Command Prompt Utility

Are you familiar with the Command Prompt? If you're using Windows 10 or 11, you might also have encountered its close cousins, the PowerShell or Windows Terminal. You can use the following commands in either of these tools, but we'll go with the Windows Terminal today. Don't worry; it really isn't scary, and is the next logical step in our effort to fix your USB stick.

The following steps will clear your drive from all files that are read-only. If you don't want to lose any of the files on your drive, prepare a backup before proceeding.

Windows Terminal Showing Diskpart List Disk Commands and Results
  1. Hit Windows Key + X, and select Windows Terminal (Admin) from the menu. Type diskpart, and press Enter (1 in the above image).
  2. Next, type list disk, and press Enter. You should see a list of currently mounted disks, like so (2 in the above image).
  3. Make sure you can see your USB drive. Mine is Disk 4. Make a note of your disk number. Now enter the following command: select disk [your disk number]
  4. Once selected, enter the following command: attributes disk clear readonly

Windows Terminal Showing Disk Attributes Cleared Successfully

You have now cleared any remaining read-only file attributes from the USB drive.

7. Clear Write Protection Error in Windows Registry

If none of the previous steps have solved your Write Protection error, don't worry. We've still got a few more tricks in the book. Next, we're going to edit the Windows Registry.

If you're not comfortable editing the registry, I understand. You can skip to the next section on how to format your write-protected USB drive. If that step is a little too drastic, however, I'd advise giving this option a try.

Press Windows Key + R to open the Run dialogue. Type regedit and press Enter. Now, navigate to the following registry location:

        HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
    

Look for a key named WriteProtect.

If it exists, double-click it. This will open the Edit DWORD (32-bit) Value box. You can now set one of two values: 0 or 1. 1 means "Yes, write protect my USB storage devices." Conversely, 0 means "No, don't write protect my USB storage devices." Set the value to 0, and then press OK.

But There's Nothing There?

In some cases, there is no "WriteProtection" registry entry. In this instance, you can create a registry key of our own. Check out the short video on how to add a WriteProtection registry value below. Note that if something goes wrong, you can reset the Windows registry to default.

8. Format the USB Drive

Make sure that you back up all the files and information from your USB drive to your computer. All data will be lost once you format the USB drive.

Formatting your write-protected USB stick is a last resort. However, it should make your USB drive able to be read and written to. Prior to formatting the USB drive, determine what kind of file system it already has—NTFS or FAT32. Normally, the existing file system is the file system that is best suited for the drive.

Open Windows Explorer, and browse to This PC. This gives you an overview of all drives connected to your system. Right-click your USB drive and select Properties.

USB Drive Properties File System

Close the Properties window. Now, right-click the USB drive again, this time selecting Format. The Format window contains several customizable options, such as the aforementioned File system, the Allocation unit size, the Volume Label, and the Quick Format option.

Format USB Drive

Change the Volume label to something memorable. As we are dealing with a potential hardware issue, uncheck the Quick Format box. That will force the format to do more than just erase files. For instance, if there is a bad sector on this USB drive, the "full" format will return an error.

Formatting won't take long, but the larger the drive, the longer you'll have to wait. Assuming there is no physical problem with the drive, your USB drive will be formatted, cleaned, and ready to go.

9. Turn Off BitLocker or Remove Encryption

If you've been using BitLocker, make sure it's turned off before trying to make changes to files on locked partitions or drives.

  1. Open File Explorer, right-click your BitLocker partition or drive and select Manage BitLocker.
  2. In the BitLocker Drive Encryption window, pick the afflicted drive, and click Turn off BitLocker.
  3. BitLocker will start the decryption. When it's done, you can edit and save files without the error message popping up again.

The same applies if you used a third-party tool to encrypt or password-protect your USB drive, though the specific steps will depend on the tool you used.

10. But I've Got an SD Card

sandisk ultra next to microsd card adapter and external usb hub
Source: Amazon

Luckily, the majority of the USB drive Write Protection error fixes listed work with SD cards, too. Unlike regular USB drives, SD cards still tend to come with a physical write protection switch. Ensure this is toggled before you panic.

USB Write Protection Errors, Solved

Sometimes, the problem is simple. Sometimes, the problem is difficult. Hopefully, we've found you a solution in either case. However, if your USB drive issues persist, it could be that something more significant is afoot.

Regardless, you've got a lot more troubleshooting tools in your arsenal now and should be able to get your USB drives working again, potentially saving you a tidy sum of money and the pain of losing all of your files! Once you have regained control, consider password-protecting your USB drive, rather than making files read-only.