Format a USB Key from the Command Prompt in Windows

October 2016

Formatting an USB flash drive from the command prompt is a simple process that can be achieved using the format command, which works for most version of Microsoft Windows (Windows 95 up to Windows 8.1).

How To Format a USB Key from the Command Prompt

Connect the USB flash drive to your PC. Then click on Start > Run. Type
and click on OK.

Your USB flash drive will be assigned a letter. For the purposes of this example, we have provided a command using the letter G but note that you should replace this letter with that which is assigned to your key.

Type the following command, followed by Enter:

format /q /x G:

Note: The q parameter stands for "quick format" and the x parameter will force the selected volume to dismount if needed.

Related :

This document entitled « Format a USB Key from the Command Prompt in Windows » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.