cosmistack-logo
Image of a padlock on a keyboard by FlyD on Unsplash

How to fix "The disk is write protected"

By Jake Turner on 11/14/25

Description: Encountered this error while trying to format your USB drive? No worries! Follow our troubleshooting steps to fix it.

Introduction

So, you're trying to format a USB drive on Windows and received the error message "The disk is write protected"? Don't get frustrated just yet - there's usually some easy ways to fix this!

WARNING: Formatting a USB drive will cause all data on it to be deleted! The troubleshooting method below assume you are aware and OK with this. Some of these methods require advanced technical knowledge and should only be used by those comfortable with doing so. DO NOT PROCEED if you need to keep the data on the USB drive!

Method 1: Look for switches on the USB drive

While rare these days, some USB drives do in fact have on/off switches on them. Check for any on yours and change them if needed. Try to format the drive again. If the error still persists, proceed to the next method.

Method 2: Diskpart utility

Step 1: Open a new Command Prompt window as an administrator.

Opening Command Prompt as Administrator on Windows

Step 2: At the Command Prompt, type "diskpart". The DISKPART utility should start:

StartDiskpart.png

Step 3: Type "list disk" to display available disks:

ListDisks.png

Step 4: Carefully locate the correct disk to target and type "select disk x" to select it, where "x" is the disk number. In this example, our USB drive is disk 1.

SelectDisk.png

Step 5: Type "attributes disk clear readonly" to attempt to clear the attribute that might be causing the USB drive to be readonly

ClearDiskAttributeReadonly.png

Step 6: You can now type "exit" twice to close the Command Prompt, or simply use the exit button to close the window.

Step 7: Try to format your disk again. If the error message still persists, proceed to the next method.

Method 3: Use Rufus

Rufus is a free and open-source utility commonly used to create bootable USB drives with operating systems. It's lightweight but packs some more powerful workings under-the-hood than what we can usually do through File Explorer, so it's perfect for this use case. You can install it directly their website, or simply install it from the Microsoft Store (recommended).

Step 1: Once installed, open it and select your USB drive from the "Device" dropdown

Step 2: Change "Boot selection" to "Non-bootable"

Rufus.png

Step 4: When ready, click "Start" and read and accept the data loss warning. The format operation is usually quite quick!

That's it! Your disk is now formatted and ready to proceed with your original use. You can either continue to use it directly, or format it again through File Explorer if you just want to be sure that the error message doesn't occur again.

Conclusion

We hope this guide was helpful! For all of your IT management and consulting needs, contact Cosmistack today!

Loading...

Disclaimer: The information provided in this article is for educational and informational purposes only. The techniques, tools, and technologies discussed are intended to be used by individuals with a solid understanding of the subject matter. Readers are entirely responsible for any actions they take based on the content of this article. This blog and its authors do not assume any responsibility for any unintended outcomes, data loss, or issues that may arise from following the instructions or recommendations provided.