The format command is a command prompt that allows you to format a specified partition on a hard drive (internal or external), floppy disk, or flash drive to a specified file system.
The format command is available from the Command Prompt in all Windows operating systems including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and older versions of Windows. You will need to run an elevated Command Prompt to have the appropriate permissions.
However, it is only useful from within Windows if you are formatting a partition that can be locked, or in other words, a partition that is not currently working with locked files (since you cannot format files that are in use). See How to Format C if you need to do that.
Since Windows Vista, the format command performs a basic write-zero hard drive cleanup by passing the /p:1 option. This is not the case in Windows XP and earlier versions of Windows.