Fix USB Drive Showing as Write-Protected on Windows 11
🔍 WiseChecker

Fix USB Drive Showing as Write-Protected on Windows 11

Quick fix: Open Terminal (Admin), run diskpartlist diskselect disk <N>attributes disk clear readonlyexit. Removes the read-only attribute from a USB drive that’s falsely marked write-protected.

You try to copy a file to a USB drive and Windows says: The disk is write-protected. Remove the write-protection or use another disk. Some USBs have a physical write-protect switch — but most don’t, and the message appears anyway. Windows sets a software write-protect flag on the disk that survives reboots and even drive removals. The fix is to clear that flag with diskpart or registry.

Symptom: USB drive (flash drive or SD card) reports as write-protected; cannot write, format, or modify files.
Affects: Windows 11 (and Windows 10) with USB flash drives or SD cards.
Fix time: ~5 minutes.

ADVERTISEMENT

What causes this

Write protection comes from one of four sources. Physical write-protect switch: full-size SD cards and some older USB drives have a small slider — flip it. Diskpart readonly attribute: Windows stores a per-disk read-only flag. Once set (sometimes by accident or by a backup tool), it persists. Registry policy: WriteProtect under StorageDevicePolicies. Group Policy can set this to block all USB writes. Drive controller failure: the drive itself has detected internal errors and entered read-only mode to prevent further data loss — this is a hardware-level signal that the drive is dying.

Method 1: Clear the read-only attribute with diskpart

The most common single fix.

  1. Plug in the USB drive.
  2. Open Terminal (Admin) from the Start right-click menu.
  3. Run diskpart:
    diskpart
  4. List drives:
    list disk

    The output shows all drives by number with their size. Identify your USB by size (e.g., a 32 GB USB shows as ~29 GB or ~30 GB).

  5. Select the USB drive (replace N with the disk number):
    select disk N

    Be very careful with this step — selecting the wrong disk could affect a different drive.

  6. Check current attributes:
    attributes disk

    Look for Read-only: Yes.

  7. Clear read-only:
    attributes disk clear readonly
  8. Verify the change:
    attributes disk

    Should now show Read-only: No.

  9. Exit:
    exit
  10. Try writing to the drive. The error should be gone.

This catches 70% of write-protection cases. If the drive is still write-protected after this, proceed to Method 2.

ADVERTISEMENT

Method 2: Remove write protection via registry

Use when diskpart succeeded but write protection persists — the registry policy is overriding diskpart.

  1. Press Win + R, type regedit, press Enter.
  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.
  3. If the StorageDevicePolicies key doesn’t exist, that’s OK — write protection isn’t enforced from here. Continue to Method 3.
  4. If it does exist, find the WriteProtect DWORD value.
  5. Set it to 0 (disabled).
  6. Close Registry Editor.
  7. Reboot.
  8. Plug in the USB and try writing. The error should be gone.

This addresses the Group Policy-set write protection that’s common on corporate-managed PCs (where IT may block USB writes).

Method 3: Format the drive (last resort, destroys data)

When the drive accepts writes after Method 1 but the filesystem is also broken — a corrupted filesystem can also produce write-protection symptoms.

  1. Important: this destroys all data on the drive. Make a copy first if you have anything important on it.
  2. Open Terminal (Admin).
  3. Use diskpart to clean and reformat:
    diskpart
    list disk
    select disk N
    clean
    create partition primary
    format fs=exfat quick label="USB"
    assign
    exit

    Replace N with your USB disk number.

  4. For drives larger than 32 GB, use fs=exfat. For smaller drives where you need broad compatibility, use fs=fat32 (Windows’ format command supports FAT32 up to 32 GB).
  5. The drive is now freshly formatted and writable.

This is the right move when the drive’s filesystem itself is the issue — the read-only flag may have been a symptom rather than the cause.

How to verify the fix worked

  • Open File Explorer. Right-click the USB drive → Properties → General tab. Confirm the size is correct and the filesystem is shown.
  • Copy a test file to the drive. The copy completes without errors.
  • Run fsutil behavior query SymlinkEvaluation in Terminal — confirms the filesystem layer is healthy.
  • The drive remains writable across removal and reinsertion.

If none of these work

If the drive remains write-protected after diskpart, registry, and reformat attempts, the drive itself is failing. Hardware indicator: USB drives include a wear-leveling controller that enters “permanent read-only mode” when its internal flash is exhausted. There’s no software fix for this — your data is still readable, but no more writes will work. Copy the data off (this still works) and replace the drive. Counterfeit or corrupt drive: cheap USB drives from unreliable sources sometimes report fake capacity. The drive accepts writes that go to nowhere or fail silently. Use a free tool like H2testw to verify your USB’s actual capacity matches what it claims. If the drive is counterfeit, the write protection is the manufacturer’s defensive flag — return for refund if possible. SD card lock pin: full-size SD cards have a physical switch; check that yours is up (unlocked). Micro SD cards in SD adapters: the adapter has the switch — the card itself doesn’t. Re-seat the card in the adapter.

Bottom line: Write-protected USB is usually a clearable flag — diskpart attributes disk clear readonly takes care of most cases. Persistent write protection after the fix means the drive is failing.

ADVERTISEMENT