How to Format a Write Protected USB Flash Drive

USB flash drives are handy tools for storing and transporting data. However, sometimes these devices can become write-protected, preventing users from modifying or formatting the drive. Write protection is a feature designed to help preserve the data on a drive by preventing accidental deletion or writing. This can be frustrating if you need to use the drive for other purposes or if the drive is displaying errors that require formatting. If you’re facing this issue, don’t worry. This guide will walk you through various methods to remove the write protection and format your USB flash drive for a fresh start.

how to format a write protected usb flash drive

Check the USB Drive’s Lock Switch

Some USB flash drives come with a physical switch that toggles write protection on and off. This is an easy-to-oversight feature that could be the sole reason your drive is write-protected.


  1. Inspect the USB drive – Carefully look at the sides of your flash drive for a switch.
  2. Toggle the switch – If you find one, move it to the opposite position. This should disable write protection.
  3. Test the flash drive – Connect the drive to your computer and try to copy a file onto it or format it to see if the problem is resolved.


This approach is a quick and simple fix with no downside other than being specific to drives with a lock switch. It may not apply to drives without this physical feature.

Use Diskpart in Windows

Diskpart is a powerful built-in Windows tool that can override the write protection on a USB flash drive.


  1. Open Command Prompt as Administrator – Type cmd in the start menu, right-click on ‘Command Prompt’ and select ‘Run as administrator’.
  2. Type diskpart and press Enter.
  3. List all disks by typing list disk and pressing Enter.
  4. Identify your USB drive by its size and type select disk X, replacing X with the disk number of your USB.
  5. Remove write protection by typing attributes disk clear readonly and hit Enter.
  6. Format the drive – Type clean, then create a new partition with create partition primary, and finally, format it using format fs=ntfs or format fs=fat32.


While Diskpart is effective, its commands can be intimidating, and there is a risk of selecting the wrong disk. However, it can be invaluable when other methods fail.

Adjust the Registry in Windows

The Windows Registry is a database that holds a wide array of configurations. A slight alteration could remove write protection.


  1. Open Registry Editor – Press Win + R, type regedit, and press Enter.
  2. Navigate to the StorageDevicePolicies – Go to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlStorageDevicePolicies.
  3. Adjust the WriteProtect value – If StorageDevicePolicies exist and there’s a WriteProtect value, set it to 0.
  4. Create the key if it’s missing – If StorageDevicePolicies doesn’t exist, right-click on Control, select New > Key, and name it StorageDevicePolicies. Then, right-click on the new key, select New > DWORD (32-bit) Value, name it WriteProtect, and set its value to 0.
  5. Restart your computer, then try formatting the drive again.


Modifying the registry can fix the write protection issue without additional software, but it comes with risks of system instability if done incorrectly.

Use a Third-Party Formatting Tool

Third-party formatting tools can sometimes circumvent write protection when built-in Windows tools fail.


  1. Download a reputable formatting tool – Ensure the software is from a trusted source to avoid malware.
  2. Install and run the tool – Follow the installation instructions and open the application.
  3. Select your USB drive – The tool will list all connected storage devices. Choose your write-protected USB.
  4. Start the formatting process – Follow the tool’s prompts to attempt to format your drive.


Third-party tools can be more user-friendly and successful in formatting stubborn drives, but there’s always a slight risk of downloading harmful software if not cautious.

Use Antivirus Software

Malware can sometimes cause write protection issues on flash drives. Running an antivirus scan can address these software-based issues.


  1. Install reputable antivirus software – If you don’t already have one, download and install antivirus software from a trusted provider.
  2. Run a full scan – Perform a full system scan, ensuring to include the USB flash drive in the scan.
  3. Follow instructions – If malware is found, follow the antivirus software’s prompts to remove it.
  4. Attempt to format the drive – After the malware is removed, see if the write protection is gone and format the drive.


Using antivirus software can eliminate malware-related write protection and enhance your system’s security. However, it might not solve hardware-related write protection issues.

Check and Repair the USB Drive

Corrupted files or errors on the drive can trigger write protection. Windows offers built-in tools to check and repair drives.


  1. Connect the USB drive to your computer.
  2. Open ‘This PC’ (or ‘My Computer’), right-click on the USB drive, and select ‘Properties’.
  3. Go to the ‘Tools’ tab and click on the ‘Check’ button under ‘Error checking’.
  4. Follow prompts – Allow the tool to check for and fix any errors it detects.


This method is easy and built into Windows, with no additional software required. However, it may not always be able to fix the issue.

Factory Reset the USB Drive

Some USB drives come with dedicated software that includes a factory reset feature, returning the drive to its default state.


  1. Download the manufacturer’s software – Check for a utility specific to your brand of USB drive.
  2. Install and open the software – Follow the on-screen instructions for setup.
  3. Locate the reset function – Find and select the option to reset or “restore” the drive.
  4. Follow the prompts – Complete the factory reset process as directed by the software.


Factory resets can be extremely effective, essentially making the drive ‘new’ again, but this option is not available for all drives and may result in total data loss.

Replace the Drive

If none of the above methods work, the USB drive may be physically damaged or irreversibly write-protected. In this case, replacing the drive may be the best option.


  1. Buy a new USB flash drive – Ensure it meets your storage needs and doesn’t have a physical write protection switch if you prefer.
  2. Transfer data – If possible, copy any important data from the old drive to a different storage medium.
  3. Dispose of the old drive responsibly – Consider recycling options for electronic waste.


While buying a new flash drive is a last resort, it guarantees the removal of any write protection issues. The downside is the cost and potential data loss if the drive can’t be accessed.

Manufacturer Support

Seek manufacturer support for removing write protection. They might offer specific instructions or warranty support.


  1. Contact the manufacturer – Look for contact information on the packaging or the manufacturer’s website.
  2. Provide details – Be ready with your flash drive’s model and a description of the issue.
  3. Follow their guidance – They may provide steps to remove the write protection or offer a replacement if it’s covered under warranty.


Contacting the manufacturer can be beneficial as they may offer the most accurate advice or replacements. However, it may take time and effort to resolve the issue this way.

Prevent Future Issues

Once you’ve managed to format your USB flash drive, taking measures to prevent future write protection issues is crucial.


  1. Safely remove the flash drive – Always use the “Safely Remove Hardware” function in your system tray.
  2. Keep the drive clean – Physically protect the drive from dirt and moisture.
  3. Be cautious with data – Avoid filling the flash drive to full capacity and regularly back up its contents.
  4. Scan for malware regularly, ensuring your antivirus software is up-to-date.


Preventative measures can extend the life of your flash drive and reduce the likelihood of encountering write protection issues. They require minimal effort but instill good data management habits.

In conclusion, encountering a write-protected USB flash drive can be a nuisance, but with the right steps, it’s often a solvable issue. From simple physical checks to advanced software solutions, there’s an arsenal of methods at your disposal to unlock and format your drive. Remember, while it’s important to exhaust all options, sometimes seeking professional advice or purchasing a new drive may be the more efficient path. And once you’ve resolved the current issue, don’t forget to practice good maintenance to prevent future problems.


Q: What does write protection mean on a USB flash drive?
A: Write protection is a security feature that prevents new data from being written or existing data from being modified or deleted.

Q: How can I tell if my USB flash drive is write-protected?
A: You’ll likely receive an error message when attempting to write, delete, or format data on the drive indicating that it is write-protected.

Q: Can I remove write protection from a USB drive on a Mac?
A: Yes, Mac computers have similar tools to Windows for managing drive settings, but the steps will differ. You’ll need to use Disk Utility or Terminal commands specific to macOS.

You may also like

Leave a reply

Your email address will not be published. Required fields are marked *

More in How-To