As a USB key is by nature a portable data medium passing between several hands, it is not uncommon for it to be write-protected, which means in plain language that nobody, except you, can modify the existing files or even reformat the key in question. If the protection is done by a small latch on the side of the key, the protection is easy to lift. On the other hand, if it was made with security software, it will have to be passed through it again to remove the blockage. In all other cases, it is possible to remove this protection with third-party software specially designed for it and it works both under Windows and under macOS.
Steps
Method 1 of 6: Using Diskpart (Windows)

Step 1. Physically unlock your key
If your USB key is fitted on the side with a security lock (a small latch that can be moved), the key may be locked. Change this position latch.
It may also happen that a key is write-locked using security software. In this case, you will have no other solution than to use this same software to unlock it and the hardest part is to know the name of this software, unless you are the author of this operation

Step 2. Insert the USB drive into a USB port
It doesn't matter which port you choose.

Step 3. Right click on the Start menu (

).
This icon is in the lower left corner of the screen. A context menu is displayed.

Step 4. Click Run
At the bottom of the menu you will see the function Execute. Click on it and an execution window will appear on the screen.

Step 5. Type diskpart in Run
Confirm with the Enter key. Diskpart then runs in a command prompt window.

Step 6. Type list disk, then validate with the Enter key
All data carriers are registered, numbered, including your USB stick. The table indicates in 6 columns the different supports and their characteristics.
- Your USB key will be easy to spot by its capacity. The third column Cut gives the capacity of the support. So if your key can store 32 GB of data, it will be marked in the column Cut 32 G bytes.

Step 7. Type select disk #
Confirm with the Enter key. The symbol # is to be replaced by the serial number of your USB key: if it was support n ° 3, you would type select disk3. Your key is now selected.

Step 8. Type attributes disk clear readonly
Validate with Enter. This is the command that allows write protection to be lifted.

Step 9. Type clean
Confirm with the Enter key. This command will erase everything on the key, now that it is no longer protected. It is ready to be reconfigured.

Step 10. Type create partition primary
Confirm with the key
Entrance. A primary partition is installed on the USB key.

Step 11. Now type the file system (or format)
Type
fs format = ntfs, fs format = fat32 or even
format fs = exFAT Confirm with the Enter key. Thus, you will have a key formatted with this file system.
- Type format fs = ntfs if you want a USB drive that can only be used on Windows PCs.
- Type format fs = fat32 for any stick with a capacity of less than 32 GB that needs to be used on a large number of different devices;
- Type format fs = exFAT for any key with a capacity greater than 32 GB that needs to be used on a large number of different devices.

Step 12. Type exit
Confirm with the Enter key. You return to the original command prompt, the operation is now complete. Your key is formatted and ready to save files and folders.
Method 2 of 6: Remove protection using third-party software (Windows)

Step 1. Download CleanGenius
CleanGenius is a free program with a version for Windows 10, downloadable at the address below: click on the blue button To download. CleanGenius comes with many features, including removing write protection from IT media.
-
The address of CleanGenius for Windows 10 is:
www.easeus.fr/partition-manager-tips/comment-supprimer-une-partition-sur-une-cle-usb-windows-10.html

Step 2. Install CleanGenius
In the file Downloads from your disk or browser, you have received the executable file win_cleangenius_trial.exe. Double click on this file to run it. Read and follow the on-screen instructions. The version is in English.

Step 3. Insert the USB drive
Insert the protected USB key into one of the USB ports on your computer.
If the USB flash drive is write-protected by a physical lock, unprotect it by sliding the latch

Step 4. Run CleanGenius
Its icon is a blue "C" with a sort of yellow lightning bolt in the middle. In the menu To start up, type CleanGenius, then click on the first result.

Step 5. Click Optimization
This is the third option in the left column, the icon is made of two horizontal arrows going in opposite directions.

Step 6. Click Write Protection
You will find in the last frame on the right of the first line of the various functionalities a blue arrow: click on it. The symbol is an ecu which contains a white check mark on a green background.

Step 7. Select your USB drive
In the drop-down menu under the mention Choose drive (Select media), choose the write-protected key.

Step 8. Click Disable
This blue button is clearly visible on the right. By clicking on it, you should be able to release the write protection.
There is a major reserve: if your key has been digitally write-protected, with software therefore, CleanGenius will not be able to do anything. You will need to know what software was used in order to unlock it
Method 3 of 6: Remove protection using Registry Editor (Windows)

Step 1. Physically unlock your key
If your USB drive has a small protective lock, it may be in the closed position. Try both positions to see which one is blocking or allowing writing.

Step 2. Run Registry Editor on your PC. Warning:
making changes to the registry is anything but trivial. If you get it wrong, you risk blocking everything. Even informed computer scientists go there on tiptoe! Only make a change if you are sure what you are doing! To run Registry Editor, do the following:
- do the combination ⊞ Win + S to run the search bar;
- type regedit in the search field;
- click on Registry Editor in the results;
- click on Yes to run the application.

Step 3. Open the Control folder
This folder is in the depths of the hard drive, proof that it should not be easily accessible. It contains other files, each more sensitive than the last. Access to this folder is made as follows:
- click on the folder HKEY_LOCAL_MACHINE;
- click on the folder SYSTEM;
- click on the folder CurrentControlSet;
- click on the folder Control.

Step 4. If it exists, click on the StorageDevicePolicies folder
In doing so, you will display its content in the right frame. If this folder did not exist, which is quite possible, it would have to be created by proceeding as follows:
- right click on an empty area of the right frame to display its context menu;
- select New, then in the menu, on Key;
- type StorageDevicePolicies, then click in a white area of the right window to validate the name of the new key;
- click on StorageDevicePolicies, the right frame is currently empty;
- right click on an empty area of this right frame, select New, then 32-bit DWORD value;
- replace the default name by typing WriteProtect directly, click on a blank area to validate this name.

Step 5. Double-click WriteProtect
A dialogue window appears.

Step 6. Enter 0 in the Value data field
Validate by clicking on the OK button. It is a question of entering the single digit 0 (zero).

Step 7. Close Registry Editor
Then restart your computer, because the changes made will only take effect after a proper restart.
Method 4 of 6: Format USB drive with third-party software (Windows)

Step 1. Download AOMEI Partition Assistant Standard
This is disk partition software that only works on Windows. And who says partition says formatting! It can be used to format a USB key, even if it is write protected. To download and install AOMEI Partition Assistant Standard 9.4, do the following:
- in your favorite browser, go to this address;
- click the white button Download software;
- click on the executable file PAssist_Std.exe located in the folder Downloads from your machine or Internet browser;
- read and follow the on-screen instructions.

Step 2. Insert the USB drive
Insert it as usual into free USB ports on your computer.
If the USB drive has a physical lock, the lock must be in the unlocked position

Step 3. Run AOMEI Partition Assistant Standard
Its icon is an incomplete, thick three-color (blue, green, and red) pie chart, with a white check mark in the center.

Step 4. Right click on your USB drive
In the lower part of the window, you have all your data media, including your USB key with some information, such as its capacity and the space still free. Right click on your key frame to bring up a drop-down menu.
- Make no mistake about the medium, otherwise you risk making a mistake, namely formatting a medium that does not need it. Make sure the name and capacity match your key.
- It goes without saying that you will have backed up all the files and folders (which interest you!), Because formatting will erase everything.

Step 5. Click Format Partition
A dialog box appears thanks to which you will be able to reformat your USB key.

Step 6. Give the key a new name
You can also keep the old one. This is the name that will appear after formatting is done. The name must be typed in the field Partition name.

Step 7. Select the file system
To the right of the key name, on the same line, select a format with the drop-down list File system. You have at your disposal three formats.
- The NTFS format is only recognized by the Windows operating system and still recent. Your key will not be recognized on machines that do not have it.
- The FAT32 format has the huge advantage of being supported by Windows, macOS, and Linux. The only constraint is that the capacity of the key must be less than 32 GB.
- The exFAT format is equivalent to the FAT32 format in that it is recognized by Windows, macOS and Linux and has no size limit (capacity> 32 GB). The downside is that this format does not work under some older operating systems (Windows 7 and earlier, or OS X Snow Leopard).

Step 8. Click Ok
As usual, it's the bottom blue button. Clicking on it saves the information.

Step 9. Click Apply
Its icon, a check mark, is the first in the top row of icons. A dialog box (Pending operations) summarizes all the elements of formatting your USB drive.

Step 10. Click Run
The blue button is clearly visible at the bottom right of the box. As the operation is not trivial, you will be asked to confirm the formatting: you will then click on Yes and the operation will begin, the time is indicated in the dialog box.
In some cases, AOMEI will format the key without removing write protection. If after this formatting, you get a warning message telling you that it is impossible to modify a file, you will have to resort to one of the methods detailed here. Finally, if the key has been write-locked using software, there is no other solution than to use this same software to unlock it
Method 5 of 6: Format a USB flash drive (Windows)

Step 1. Insert the USB drive
Insert the protected USB key into one of the USB ports on your computer.
If your USB drive has a security lock on the side, the key may be locked. Change this position latch

Step 2. Right click on the Start menu (

).
The icon in question is in the lower left corner of the screen. A context menu (other than the one that usually appears with the left click) is displayed.

Step 3. Click Disk Management
The Disk Management Wizard will then run. All data carriers are then displayed, both hard disks and USB sticks.

Step 4. Right click on your USB drive icon
It is necessarily in the top frame, in the column Volume. Check that you are selecting the correct key, for example by looking at the value of the capacity.

Step 5. Click Format
As the operation is not trivial, you will be asked to confirm the formatting: you will then click on Yes and the operation will begin.
Of course, you will have backed up all the files and folders (which interest you!), Because formatting will erase everything

Step 6. Give the key a new name
You can also keep the old one. This is the name that will appear after formatting is done. The name must be entered in the field Volume name.

Step 7. Select the file system
Under the name of the key, you must select a format with the drop-down list File system. You have at your disposal three formats: exFAT, FAT32 and NTFS.
- The NTFS format is only recognized by the Windows operating system and still recent. Your key will not be recognized on machines that do not have it.
- The FAT32 format has the huge advantage of being supported by Windows, macOS, and Linux. The only constraint is that the capacity of the key must be less than 32 GB.
- The exFAT format is equivalent to the FAT32 format in that it is recognized by Windows, macOS and Linux, and has no size limit, the key may have a capacity greater than 32 GB. The downside is that this format does not work on some older operating systems (Windows 7 and earlier, or OS X Snow Leopard).

Step 8. Click Ok twice
A message is there to warn you that everything will be erased on the key: if you agree, then the key formatting will begin.
Method 6 of 6: Using Disk Utility (macOS)

Step 1. Physically unlock your key
If your USB key is equipped on the side with a security lock (a small latch that can be moved), the key may be locked. For this method, the key must be unlocked.

Step 2. Insert the key into one of the free USB ports on your Mac

Step 3. Run Finder (

).
In the Dock, its icon is a square made of two recessed faces (one blue, the other white).

Step 4. Left click on the Applications folder
The right frame will display all the software and other programs stored on your hard drive.

Step 5. Double-click on the Utilities folder
It is usually at the very bottom of the list of applications.

Step 6.Double-click on Disk Utility
This tool is represented by a hard disk surmounted by a stethoscope. By double-clicking on this icon, you open the utility which will allow you to format the key.

Step 7. Select your USB drive from the left column
In the large part on the right, you will see various information about your USB key.

Step 8. Right click on the Erase tab
This is the third tab in the row of tabs at the top of the right frame.

Step 9. Optionally give your key a name
You can leave the default name, keep the old name or rename it.

Step 10. Select the key format
All formatting involves choosing a file system (also called a "format"). If you want a USB drive that is recognized on both a Mac and a PC, select MS-DOS (FAT) (key with a capacity of less than 32GB) or ExFAT (key with a capacity greater than 32GB). Otherwise, you can format it to work in macOS (2 other formats).

Step 11. Click the Clear button
It is in the lower right corner of the active window. Then begins the formatting of your key and it will be done on the basis of a read and write permission.