How to Enable/Disable USB Write Protection in Windows
How to Check and Enable/Disable USB Write Protection in Windows (2025 Guide)
Is your USB flash drive or memory card showing a “Write-Protected” error? In this guide, you’ll learn how to check, enable, or disable USB write protection in Windows 10, 11, and 8.1 using simple and reliable methods.
🔍 What Is USB Write Protection?
Write protection is a feature that prevents changes to files stored on a USB drive. It ensures your data cannot be deleted, modified, or formatted accidentally. You can turn this feature on or off depending on your security needs.
- Enabled: USB is read-only — files can be viewed but not modified.
- Disabled: Full read/write access — you can copy, delete, or format files.
🧭 How to Check if a USB Drive Is Write-Protected
Before making changes, verify if the drive is indeed write-protected:
- Try copying or deleting a file: If Windows displays “The disk is write-protected”, it’s locked.
- Use DiskPart to check:
diskpart list disk select disk X <-- Replace X with your USB drive number attributes diskLook for
Current Read-only State : YesorRead-only : Yes. If either is Yes, write protection is enabled. - Check Group Policy settings: System policies might restrict removable storage access.
⚙️ Method 1: Physical Lock Switch
Some USB drives and SD card adapters have a LOCK/UNLOCK switch. Move it to the UNLOCK position to disable protection or to LOCK to enable it. Reinsert your device and test it again.
💻 Method 2: Registry Editor
- Press Win + R → type
regedit→ press Enter. - Go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control - If missing, create a new key named
StorageDevicePolicies. - Inside it, create a
DWORD (32-bit)value namedWriteProtect. - Set value to 1 = Enable protection, or 0 = Disable.
- Restart Windows for changes to take effect.
🧠 Method 3: Command Prompt (DiskPart)
Use the DiskPart utility for direct control over USB attributes.
diskpart
list disk
select disk X <-- Replace X with your USB drive number
attributes disk set readonly <-- Enable write protection
attributes disk clear readonly <-- Disable write protection
exit
🪣 Method 4: Group Policy Editor (Windows Pro/Enterprise)
- Press Win + R, type
gpedit.msc, and press Enter. - Navigate to:
Computer Configuration → Administrative Templates → System → Removable Storage Access - Double-click Removable Disks: Deny write access.
- Select Enabled to block writes, or Disabled/Not Configured to allow them.
- Click Apply → OK.
🧰 Bonus Tip: Third-Party Tools
If you prefer an easier interface, try these trusted tools:
- USB Write Protect Utility – NirSoft
- EaseUS Partition Master – Manage partitions and unlock drives
- HP USB Disk Storage Format Tool – Reformat and clear protection
✅ Summary
| Step | Method | Action |
|---|---|---|
| 1 | Check via DiskPart | Confirm if USB is write-protected |
| 2 | Physical switch | Enable or disable manually |
| 3 | Registry Editor | Software-based protection |
| 4 | DiskPart | Command-line control |
| 5 | Group Policy | System-wide settings |