
You cannot copy, delete, or format files because the SD card says it is write protected. This applies to SD, microSD with adapters, SDHC, and SDXC cards used in cameras, phones, and computer readers on Windows and Mac.
Does This Affect You?
Write protection is usually caused by the physical lock switch, a Windows read-only flag, or file-system corruption that makes the system protect the card.
Check the Physical Lock Switch
This takes seconds and is the most common fix.
- Look for the tiny lock slider on a full-size SD card or microSD adapter.
- Move it away from the Lock position.
- If it feels loose and slides back, hold it in the unlocked position with a small piece of tape as a temporary workaround.
- Remove and reinsert the card so the reader detects the switch again.
- If using bare microSD with no adapter, there is no physical lock switch on the card itself.
Clear a Windows Write-Protected Flag
Use this when the switch is unlocked but Windows still refuses writes.
- Open Terminal or PowerShell as administrator.
- Run diskpart, then list disk.
- Identify the SD card by size, then run select disk N, replacing N with the card number.
- Run attributes disk clear readonly.
- Type exit, eject the card, reinsert it, and test writing again.
Confirm the disk number carefully. Clearing the read-only flag does not delete data by itself, but DiskPart targets whole disks and the next steps can be destructive. We provide no warranty; proceed at your own risk.
Format the Card if It Is Still Write Protected
Only do this after backing up or recovering anything important. Formatting erases the card.
- On Windows, right-click the card in File Explorer and choose Format.
- On Mac, open Disk Utility, select the card, and choose Erase. Use exFAT for Windows/Mac sharing or FAT32 for older cameras.
- If formatting fails on multiple computers and readers, the controller may have failed.
Cheap USB readers can falsely report write protection, so test another reader before replacing the card. If the card stays write-protected across devices after the switch, DiskPart, and format attempts, replacement is the practical path.
Sources
- SanDisk – How to remove write protection from a memory card (2025)
- Microsoft Support – The disk is write protected error (2025)
- Kingston Technology – SD card write protection troubleshooting (2024)
