Ever run into the disk is write-protected error that stops you from formatting your USB drive? If you’re wondering what write protection actually does, or why your drive ended up locked this way, keep reading below.
What does Write Protection on USB mean?
Once a USB drive gets write-protected, you can’t create new files, edit or delete what’s already there, or format it, it’s stuck in read-only mode. Write protection on USB flash drives or pen drives exists mainly to guard against accidental data loss. It also keeps viruses from corrupting your files and stops you from overwriting or deleting data by mistake.
If you’re running into trouble and can’t format a write-protected USB, work through the methods in the next section.
How to Fix Cannot Format USB Drive Write-Protected Issue?
To format a write-protected USB drive, give these simple but effective fixes a try. Once the drive is formatted, you’ll be able to create new files or edit whatever’s saved on it.
Keep in mind that once you format a write-protected USB drive, every bit of data on it gets wiped out. So before you format anything, make sure you’ve got a backup or recover data from the USB drive first.
Method 1: Unlock the Write Protection Switch on USB
Most USB flash drives have a physical switch on one side. Check whether your USB has a lock, then just slide the switch the other way to unlock the write protection on the pen drive.
No physical switch on your USB? Wondering how else to format a write-protected USB? Try the next methods to solve the cannot-format-write-protected-USB-drive problem.
Method 2: Use the Diskpart Command to Format the Write-Protected USB
You can use the Diskpart command line to clear every write-protection file attribute from the USB and reformat it.
Note: Make sure there’s nothing important left on the drive, since formatting it wipes out your data.
1: Press Windows + R to open Run >> type diskpart >> Enter. That launches the Diskpart command prompt utility.
2: Type the commands below, hitting Enter after each one.
- list disk
- select disk n (n is the number of your USB drive from the list above.)
- attributes disk clear read-only
Running these commands sets your USB’s attributes to allow writing new content and clears the read-only mode. Check whether you can now format the files on the once write-protected pen drive.
Method 3: Use Registry Edit to Format the Write-Protected USB Drive
Registry Editor is the tool that lets you change keys to alter the USB drive’s attributes.
Note: Stick to the exact commands here. A wrong step could put your USB at risk and lead to serious issues or data loss.
1: Press Windows + R to open the Run command, then type Regedit.exe in the search box >> click run as administrator to open the Registry Editor.

3: In the right-hand pane of Regedit.exe, double-click the Write-Protect value. Make sure the volume data field reads “0
4: Double-click it to open it, change the Value data from “1” to “0,” then click “OK” to save the change.
Now close Regedit, restart your computer, and check whether your write-protected pen drive will format. You’ll find the device isn’t write-protected anymore, the restriction is gone.
How to Remove Write Protection on USB Without the Switch
If there is no slider on the casing, the lock is coming from software, not hardware, and you need a different approach to remove write protection from USB drive storage. The three methods already covered on this page, Diskpart, Registry Editor, and the physical switch, are the main routes, but a few things trip people up before they even get that far.
Check whether the drive is flagged read-only by a virus scanner first. Some antivirus tools, and Windows Defender in certain configurations, will mark a USB as read-only automatically after detecting an autorun threat. Run a scan, clear anything it finds, then try formatting again before touching Diskpart or the registry.
If the drive shows as RAW instead of its usual file system, write protection is not actually your problem. A USB flash drive turned RAW cannot be formatted normally no matter what you clear, because Windows cannot read its partition table at all. That needs a different fix entirely, not a write-protection removal.
Encryption is the other thing people miss. A drive locked with BitLocker To Go shows as inaccessible rather than write-protected in most dialogs, but some older Windows builds surface it as a write-protection error instead. Unlock it first in File Explorer (right-click, Manage BitLocker) before assuming the drive itself is faulty.
Should I format my USB drive ntfs or fat32 or exfat?
For a drive you move between Windows, Mac, and game consoles or TVs, pick exFAT. It has no practical file-size cap (FAT32 chokes on anything over 4 GB) and, unlike NTFS, Mac and most non-Windows devices can write to it without extra software.
Use FAT32 only if the drive has to work with older hardware, think routers, printers, or a car stereo from before 2015, since a lot of that firmware still does not recognize exFAT. NTFS is the right call when the drive is staying on Windows permanently, say as a backup target, because it supports file permissions and handles large volumes better than the other two.
One thing worth knowing: Windows 11’s Format dialog will sometimes gray out exFAT as an option on drives under 4 GB, defaulting you to FAT32 instead. That is a size-based limitation in the dialog itself, not a problem with your drive.
Recover Lost Data from Write-Protected USB Drive
If you end up losing data somewhere in this process, you can easily recover data from the formatted USB with the help of the SFWare data recovery tool.
Conclusion:
With these methods, formatting a write-protected USB drive isn’t hard to pull off. Just remember that formatting wipes your data along with it, so backing up your files beforehand is always the smart move. And if you’ve already formatted important files and folders without a backup, don’t panic. SFWare data recovery software can help you recover data from formatted USB flash drives.




