Most of the time, the SD card shows as write protected because the small lock switch on its side has slid down into the locked position. The same switch sits on the adapter that holds a microSD card. Sliding it back up toward the contacts fixes the problem for most people in a few seconds.
If the lock switch isn’t the cause, the following errors might be displayed by Windows (disk is write protected), Mac (card is read only), and Camera (the card is locked).
The below mentioned fixes are listed from the lowest to the highest risk to the SD card. Before moving to any fix beyond Fix 2, it’s advised to copy all necessary files from it.
Why an SD Card Becomes Write Protected
-
The lock switch on the card or its adapter is in the locked position.
-
Dirty contacts or a faulty card reader stop the computer from writing to the card.
-
A read only attribute has been set on the disk, which Windows then enforces.
-
A Windows registry setting is blocking writes to all removable drives.
-
File system errors cause the computer to mount the card as read only.
-
The card has worn out and locked itself to protect the data still on it.
Quick Look at the Fixes
|
Fix
|
Risk
|
Time
|
Platform
|
|
1. Lock switch and adapter
|
No risk
|
Under 1 minute
|
Any
|
|
2. Clean contacts, another reader
|
No risk
|
5 minutes
|
Any
|
|
3. Diskpart clear readonly
|
Low
|
5 minutes
|
Windows
|
|
4. Registry WriteProtect
|
Medium
|
10 minutes
|
Windows
|
|
5. Error checking or chkdsk
|
Low
|
5 to 30 minutes
|
Windows
|
|
6. Disk Utility First Aid
|
Low
|
5 to 15 minutes
|
Mac
|
|
7. Format
|
Erases data
|
1 minute to over an hour
|
Any
|
Fix 1: Check the Lock Switch and Adapter (No risk)

Look at the left edge of a full size SD card and you will see a small sliding tab. When it is pushed down, away from the gold contacts, the card is locked.
-
Take out the card from the reader or the device.
-
Move the switch to the highest point, towards the contacts.
-
Put the card back in softly to ensure the switch does not get stuck in the slot and move down.
MicroSD cards have no switches, but the adapter where the card sits does have one, and this switch is often overlooked.
Older adapters may lose the switch and move it down each time the card goes in, but it doesn’t cost much to change the adapter.
Fix 2: Clean the Contacts and Try Another Reader (No risk)
Dust, skin oil or a worn reader can stop the computer from writing to a card that is otherwise fine.
-
Dust or dirt from your fingers or an old reader may prevent the computer from accessing an otherwise good memory card.
-
Rough the gold contacts of the memory card using a soft, lint-free cloth. In case of grease spots, clean using a Q-tip moistened in rubbing alcohol.
-
Test the memory card using a different USB port, a different card reader or even a different computer.
-
If the memory card works on a camera or other card reader, then the initial reader is at fault and not the card.
Built in laptop card readers wear out more often than most people expect. A cheap USB reader is a quick way to rule them out. If the card turns out to be worn and you need a replacement, you can compare Digiera's SD and microSD cards.
Fix 3: Clear the Read Only Attribute in Diskpart (Low)

The Windows operating system can mark an entire disk as read-only, but using Diskpart, you can reset the attribute and keep your files safe.
-
Click on the Start menu, right-click on Command Prompt, and select Run as Administrator.
-
You need to type diskpart and press Enter.
-
Then type list disk and hit Enter. Identify your card by its size.
-
Type select disk 2, replacing 2 with your card's number, and press Enter.
-
Type attributes disk to see whether "Current Read only State" is set to Yes.
-
Type attributes disk clear readonly and press Enter.
-
Type exit, remove the card and insert it again.
|
Stop after clear readonly
Some guides continue with the clean and format commands. Those commands erase everything on the card. Only run them if you have already copied your files and decided to wipe the card.
|
The command and its options are documented in Microsoft's attributes disk reference.
Fix 4: Change the WriteProtect Value in the Registry (Medium)
Registry values may prevent any writing to the removable media drives on a Windows-based machine. The Medium tag is used for this fix as editing of the registry impacts the entire system, so make sure to back up the key first.
-
Press Windows + R, type regedit and press Enter.
-
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.
-
Right click StorageDevicePolicies and choose Export to save a backup copy.
-
Double click WriteProtect in the right pane, change its value to 0 and click OK.
-
Close Registry Editor and restart the computer.
Since there is no StorageDevicePolicies in existence, this may not be the configuration preventing access to your card. You may just disregard the procedure of creating this key.
Fix 5: Check the Card for Errors on Windows (Low)
File system errors can cause Windows to mount a card as read only. Windows has a built in tool that finds and repairs them.
-
Open File Explorer, right click the card and choose Properties.
-
Open the Tools tab and click Check under Error checking.
-
Choose Scan and repair drive and wait for it to finish.
You may do the same thing from the administrator Command Prompt using the command chkdsk E: /f, where "E" is the letter of the drive of your card.
Fix 6: Run First Aid in Disk Utility on a Mac (Low)
In case of a Mac, the problem lies with the file system of the disk, which is experiencing some problems that could be resolved with the help of the First Aid utility.
-
Launch the Disk Utility found in Applications > Utilities.
-
Navigate to View > Show All Devices and select the disk from the list in the sidebar.
-
Perform First Aid, click Run, and wait until the process finishes.
-
Unmount the disk and remount it.
There is an advice of changing the permissions of the card in the Get Info window. However, it is useless in case of cards that are formatted as exFAT and FAT32 since they have no Mac permissions. The steps above follow Apple's First Aid guide.
Fix 7: Format the Card (Erases data)
Formatting builds a new file system, which clears most software causes of write protection. It will also erase everything from your card, but this process should be done only after backing up the data.
Try to format the card on the device where the card will be used, because it will format the card according to the specifications of the device.
You can format the card with exFAT if the card is 64 GB or more and FAT32 for those below 32 GB on computer. In case the card doesn’t get formatted or the protection reoccurs immediately, refer to the next fix.
When the Card Itself Is Failing
Flash memory can only be rewritten a limited number of times. As a card nears the end of its life, its controller can switch the card to permanent read only mode so that you can still copy off what is stored on it.
No switch, command or registry change can reverse that, because the card is protecting the data on purpose.
These signs point to a worn card rather than a setting:
-
Write protection comes back after every fix in this guide.
-
Formatting fails or stops partway through.
-
The card is several years old, or it has spent its life in a dash cam or security camera that records around the clock.
-
Files copy off slowly or some of them come back damaged.
If you see these signs, copy your files off today while the card can still be read, and then retire it.

For a full size replacement, the Digiera LSU100 UHS-II SD card is an SDXC card for cameras. For phones, action cameras and drones that use microSD, there is the Digiera LT100 microSD card.
FAQs
How do I unlock the write protect of the SD card?
First, you have to move the lock switch either on the SD card itself or on the SD card adapter upwards towards the pins. However, if this doesn’t work, try changing the reader and remove the Read Only flag using Diskpart on Windows or First Aid on a Mac. Formatting will be your final resort.
Why is my micro SD card write protected?
A microSD card has no switch, so the cause is usually the lock switch on its adapter, a faulty reader or file system errors. If none of those apply, the card may be worn out and locked to read only.
Why does my SD card say read only on a Mac?
The lock switch is the most common cause on a Mac as well. If the switch is set, use the First Aid command in the Disk Utility program; if the card is formatted in NTFS, remember that the system can only read from the file, not write to it.
Can I remove write protection without losing data?
The first six fixes in this guide do not erase anything. It is only the last step (formatting) that involves erasing data.
Why does my camera say the card is locked?
A camera shows a locked card message when the lock switch is down. Slide it up, insert the card carefully and try again. If the message stays, try the card in a computer to check for errors.
Does formatting remove write protection?
Formatting clears write protection caused by file system errors. It cannot remove protection caused by the lock switch, and a worn card that has locked itself will refuse to format.
Can a write protected SD card be fixed permanently?
A card blocked by a switch, a setting or file system errors can usually be fixed for good. A card that has worn out and switched itself to read only cannot be fixed, so copy the data off and replace it.