How to Format an SD Card in Command Prompt

By Nick Peers

Learn how to use the Format command to format any drive, including external storage drives, in Windows 7 and 8.1.

Things You'll Need

  • Computer
  • SD Card
  • SD Card Reader/Slot

Use the Format command to format a removable storage device, such as an SD card, directly from the Command Prompt in Windows 7 and 8.1. You can include the command in a batch file and format the card by running the file. You can even run the file at startup to automate the task.

Tip

Double-check the letter of the drive before running the format command. You can erase an entire partition if you type the wrong drive letter in the Command Prompt.

Warning

Recovering data after you run the Format command is usually impossible. Data recovery experts may be able to recover data, but sensitive information may be lost.

Step 1

Connect the SD card to the computer. If your computer doesn't have a built-in SD card reader, use an USB SD card reader. Avoid USB hubs whenever possible, and connect the card reader to a USB port on the computer itself.

Press Windows-X to display the Power User menu, and then click File Explorer.

Power User menu in Windows 8.1.

Locate the drive assigned by Windows to your SD card in the left pane and remember or write down the drive letter.

An SD card drive in File Explorer.

Step 2

Press Windows-X to display the Power User menu, and click Command Prompt to launch the utility.

The Command Prompt option in the Power User menu.

Type format letter: and press Enter to format the drive. Don't forget to replace letter with the correct drive letter, for example format e: for the E drive. Press Y and then Enter to confirm your action if you are sure you want to erase the contents of the SD card. The format command without any parameters formats the drive using the default size and type.

The Command Prompt in Windows 8.1

Append the /fs:FORMAT parameter to the command to specify the file system to use. You can replace FORMAT with FAT, FAT32, NTFS or UDF. Example: format I: /fs:FAT32.

Type format letter: /q to perform a quick format -- Windows does not scan for bad sectors with this parameter. Example: format I: /q.

A sample format command in the Command Prompt

Append the /v:MySDCard parameter to assign a volume label -- the volume label is the name of the drive -- to the drive. Example: format I: /v:MySDCard.

To manually specify the allocation unit size -- the size of individual blocks on your hard drive -- for the file system, append the /a:SIZE parameter. The default size used by Windows is good for standard users. Example: format I: /fs:FAT32 /a:1024.

To dismount the volume before formatting it in order to avoid errors if the volume is in use, append the /x parameter. A dismount forces all open file handles to close so that nothing else can access the data on the card while Windows formats it. Example: format I: /q /x.

Step 3

Open File Explorer and select the SD card drive. Ensure it is formatted properly by looking at the right pane. A formatted drive does not contain any files or folders.

An empty SD card drive in Windows 8.1

Right-click the drive, select Properties and then ensure the device uses the correct file system -- it is displayed in the File System section of the General tab.

The File System section of the General tab.

Warning

Formatting the SD card erases all its data. Formatting the wrong drive may cause catastrophic loss of data and may even crash the entire operating system.