How to format a hard drive, SSD, or USB flash drive

Updated: 05/21/2018 by Computer Hope

My computerThere are several ways to format a computer hard drive, solid-state drive (SSD), or USB flash drive to erase all of the information on a drive and prepare it to hold data. To proceed, select one of the methods from the list below and follow the instructions.

Tip: You can use the instructions on this page to format a memory card in a memory card reader.

Note: If you want to format a hard drive and reinstall Windows, see our page on how to erase a hard drive and start over.

Note: If you want to format a write-protected USB flash drive, you must first disable the write protection, then proceed with formatting the flash drive.

Format through Windows

Format using My Computer

  1. Press the Windows key, type My Computer, and then press Enter.
  2. Find the appropriate drive icon and right-click it.
  3. In the drop-down menu that appears, select the Format option.
  4. In the Format window, most options should be set by default, and you can most likely leave those default settings as is.

Note: Quick Format is optional. The Quick Format feature formats the drive faster but makes it easier to recover data using specialized software.

  1. Click Start to begin the format process.

Format using Windows command prompt

  1. Open the Windows command prompt window.
  2. At the prompt, type format and the appropriate drive letter, and then press Enter. For example, if the hard drive you are formatting is drive E:, you would type format E:
  3. When asked if you want to erase all contents on the hard drive, type Y to proceed.

Note: You may see a prompt to Enter current volume label for drive E: or something similar, depending on which drive letter you are formatting. You need to know the volume for the hard drive before starting the format process. Before executing the format command, you can type vol e: (replace e: with the drive letter of the hard drive being formatted) and press Enter. You should see the volume name displayed, for example, with Volume in drive E is MyData, "MyData" is the volume name.

  • See our format command page for further information and other options available with this command.

Zero-Fill Format using Windows command prompt

Note: The zero-fill format option is only available in Windows Vista and later.

For a more thorough erasing of data on a hard drive, you can zero fill it, which overwrites all data on the hard drive with zeroes. Doing a zero filling makes it impossible for someone to recover data from the hard drive that has been overwritten.

To zero fill a hard drive, use the following command at the Windows command prompt.

format e: /p:count

The above command tells Windows to format the hard drive (in this case, the E: Drive; replace e: with the drive letter for the one you are formatting) by writing zeroes to every sector. Replace the count text with the number of times you want the hard drive to be formatted. After the first round of zero-fill formatting, the format process fills every sector with a random number between zero and nine. The more times you format the drive with the count option, the more securely the hard drive is erased.

  • See our format command page for further information and other options available with this command.

Format at DOS command prompt

If you have a Windows recovery disc or a Windows installation disc, you can access the DOS command prompt and erase a hard drive. Using the following format method allows you to erase the primary hard drive on the computer (e.g., the C: drive).

  1. Insert the Windows recovery disc or Windows installation disc in the CD or DVD drive.
  2. Restart the computer. As the computer is booting up, you should see a message like Press any key to boot from CD. Press any key on the keyboard to make the computer boot to the Windows recovery or installation disc.

Note: If you do not see the Press any key message, the computer's boot sequence is likely not set to boot from the CD or DVD drive first. Check the CMOS setup and change the boot sequence to make the CD or DVD drive first in the boot order.

  1. Once the computer has finished booting to the disc, you should see a Recovery Options box. Click Next to proceed through the recovery process.
  2. After a few moments, you should see a System Recovery Options screen. Select the Use recovery tools that can help fix problems starting Windows option.
  3. Select that operating system you want to repair and click Next.
  4. On the next screen, select the Command Prompt option.
  5. The recovery process should exit and return you to the command prompt. At the command prompt, type the following command: format e: (change the e: drive letter to that of the hard drive you are formatting).
  6. Once asked if you want to erase all contents on the hard drive. Type Y to proceed.

Note: You need to know the correct volume for the hard drive you want to format. For example, you may see a prompt to Enter current volume label for drive E: or similar, depending on what hard drive letter you are formatting. Before executing the format command, you can type vol e: (replace e: with the drive letter of the hard drive being formatted) and press Enter. You should see the volume name displayed, for example, with Volume is drive E is MyData, "MyData" is the volume name.

  • See our format command page for further information and other options available with this command.