A very common mistake among those who use USB sticks or SD cards is that of having write protection enabled. The system prevents any modification: you cannot copy, delete, or format. The drive has become “read-only” and, in most cases, without any warning.
Fortunately, there are effective methods to unlock a write-protected USB, both on Windows and macOS. In this guide, we explain everything in a simple and practical way.
What does “write-protected” mean?
A write-protected USB stick is a device on which it is not possible to perform modification operations: you cannot save files, delete them, or format the drive. The content can only be read.
This protection can be:
- Physical: there is a hardware switch on the USB stick
- Software: system settings or file system errors
Solutions for Windows
1. Check the physical switch
Some USB sticks and SD cards have a mechanical switch to enable/disable writing. Make sure it is set to “unlock.”
2. Use the Registry Editor (Regedit)
Press Win + R, type regedit and go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
If the WriteProtect entry exists, set its value to 0. Restart your PC.
3. Use Diskpart
diskpart list disk select disk X attributes disk clear readonly exit
4. Check antivirus and third-party protections
Some antivirus or backup software block writing on USB devices. Temporarily disable them and try again.
Solutions for macOS
1. Check permissions with Disk Utility
Open “Disk Utility,” select the USB stick, click on “First Aid,” and verify the file system.
2. Use the Terminal
diskutil list sudo diskutil unmountDisk /dev/diskX sudo chmod -R ugo+rw /Volumes/NOME
3. Format the drive (if data is not needed)
If the USB stick is unrecoverable, you may need to format it.
When the problem is the USB stick
If none of the solutions work, the USB stick might be physically damaged. In these cases, try diagnostic software or consider replacing it.
How to recover files
If the USB stick is readable but locked, copy the files to another device. If the files are corrupted, use recovery software such as:
- Recuva (Windows)
- Disk Drill (Mac and Windows)
- EaseUS Data Recovery
FAQ
Why is the USB flash drive write-protected?
Due to hardware protection (switch), software restriction, or file system error.
How to unlock a write-protected USB flash drive?
Check the switch, use Regedit or Diskpart on Windows, Disk Utility or Terminal on Mac.
Can I recover data from a write-protected USB?
Yes, if the data is readable, copy it elsewhere. Otherwise, use recovery software.
Is it possible to format a write-protected flash drive?
Yes, but only after removing the protection. In some cases, the hardware is damaged and cannot be formatted.










