There are many reasons why you might want to format a hard drive, including a clean installation of Windows, to get rid of a virus or malware or simply because you're giving the drive to someone else or throwing it away. Here, we'll explain all you need to know to get the job done properly. What you'll need to format the hard drive depends on a few things, such as whether it's your only hard drive and whether you have a spare PC or not.

You can't, for example, format the hard drive on which Windows is running. In order to format the disk and reinstall Windows (or another operating system) you will need to boot your PC from a Windows installation disc, a USB flash drive or another bootable disc.

See also: Delete files permanently for free with Eraser 6

Formatting is the process of deleting all the data on the hard drive, but beware of 'Quick Format' which leaves all your data in place and makes the drive appear to be empty. A quick format is ok if you have a brand new hard drive, or you want to reinstall Windows, but not if you're disposing of the disk or giving it to someone else.

A word of warning: make sure you have successfully backed up any photos, videos, music and other documents from your drive before you format it. Although files can be recovered in some situations, prevention is always better than cure.

Note: All methods for Windows 8, also apply to Windows 8.1.

How to format a hard drive: partitions

It's important to understand about partitions before you start. A hard drive's storage can be divided up into smaller sections, called partitions. It's possible to format one partition while leaving the others untouched.

That's useful in certain situations, but if you want to format the entire hard drive and use the entire capacity in one block, you'll also need to delete the partition information.

How to format a hard drive from the BIOS

Many readers have asked us how to format a hard disk from BIOS. However, while your PC's BIOS can perform many different functions, you can’t use it to format a hard drive, create or delete partitions.

If you need to format a disk and you can't do it from within Windows, you can create a bootable CD, DVD or USB flash drive and run a free third-party formatting tool.

One option is Darik’s Boot and Nuke (DBAN), a free program that can be downloaded here. This program will totally erase and format your hard disk, allowing for a clean install of a new OS, but the process cannot be undone, so be warned. (See also: Recover deleted files for free: recover lost data.)

How to format a hard drive

DBAN is supposedly only able to create a bootable CD/DVD-R, but if you don’t have any blank discs or a burner, there is a workaround available in the form of a separate third-party program.

Universal USB Installer will quickly and easily convert the DBAN ISO image you downloaded to run from a bootable USB. Simply insert a blank USB flash drive, run the Universal USB Installer setup program, and follow the prompts.

You will be asked to scroll through and pick the Linux Distribution you want to install to USB (in this case, the latest version of DBAN), followed by its location on your computer and the letter of the USB drive you’d like to install it to. Once that information is complete, click create.

How to format a hard drive

To boot from this USB drive rather than your usual boot device (in most cases, this would be the hard drive), you’ll have to change some settings in the BIOS. If you’re not sure how to access the BIOS menu, read our guide on how to enter the BIOS.

In the BIOS, navigate to the boot order settings, and change the primary boot device to the USB drive (it shouldn't need to be plugged in to make this selection). After you’ve saved your settings and exited the BIOS, insert your bootable USB, restart your computer.

How to format a hard drive

Your PC should automatically boot the DBAN software, which will guide you through the process of erasing your hard drive, with options for different levels of data-wiping.

It will treat the USB as another drive so to avoid inadvertently wiping that as well, remove it after you’ve booted into DBAN.

How to format a RAID drive

If you have two or more disks configured as a RAID, there are various ways to format these drives. Before you use any of them, make sure you back up any files you want to keep.

  • Use a software utility which came with your RAID controller or motherboard.
  • Go into the RAID controller's BIOS (look for a message during PC boot up) and look for an option to format the drive(s) or reconfigure the RAID as individual disks (this will erase them all).
  • Unplug the drive you want to format and connect it to a different SATA port on your motherboard which isn't part of the RAID controller. Then, follow the Windows Disk Management method below since the disk won't be visible in Windows Explorer.

How to quick format a hard drive

Windows Vista, 7, 8 and 10 have a built-in Disk Management tool (see below), but the fastest way to format a hard drive is to click the Start button, then Computer and right-click on the hard drive you want to wipe (you can't format the drive on which Windows is installed for obvious reasons). Choose Format… from the menu and a new window will appear with a few formatting options. As a note: Windows 8 users will need to search for 'This PC' within the Metro interface.

Quick format a hard drive

By default Quick Format is checked, and you can choose the file system and allocation unit size as well as changing the volume label (the drive's name). Typically, you can leave all settings unchanged and click the Start button. In under a minute your hard drive will be formatted.

Format options

You should choose NTFS as the file system if it isn't already selected for Windows Vista, 7, 8 or 10 and ensure the Allocation Unit Size is set to 'Default Allocation Size'.

Using Windows' built-in Disk Management tool

Type diskmgmt.msc or Disk Management into the search box in Vista, 7, 8 or 10 and then click on only result that appears in the menu above, with the same name.

This is the easiest way to launch Disk Management, but you'll also find it in the Control Panel if you search for 'disk' and select the 'Create and format hard disk partitions'.

Disk Management isn't as powerful as a standalone partition management tool, but it is still capable of formatting data. See also: Acronis True Image 2014 review.

Disk Management Windows 7

When you install a new (additional) hard drive in your PC, you might wonder why it doesn't appear in Windows Explorer. The reason is because it needs to be initialised and formatted - you can do this in Disk Management.

When the tool loads, it will analyse all your computer's drives and will prompt you to initialise a new disk that it finds.

Initialize disk

If your disk is larger than 2TB, you should opt for GPT (GUID Partition Table). This setting also lets you create more than four partitions.

If you don't see a prompt, look in the list of drives and you should see one that says 'Not Initialized'. Right-click on it and choose Initialize Disk.

Once that's done, right-click in the hatched Unallocated space and choose New Simple Volume…

Follow the instructions, choosing how big you want the partition to be (in MB - 1024MB = 1GB), and which drive letter you want (one will be chosen, but you can opt to change it if you wish).

When you come to format the partition, our advice is the same as in the Quick Format section above.

If you select a size for the partition that's smaller than the total capacity of the drive, say 500B on a 1TB drive, you'll end up with some unallocated space on the drive which you can format by repeating the process you've just completed.

Changing a partition's size

You can use Disk Management to expand or shrink a partition. Simply right-click on one and choose the appropriate option from the menu that appears. If shrinking, the partition will be checked to find out how much empty space it contains.

Shrink a partition

It's a little confusing as the numbers are displayed in MB rather than GB, but you can adjust the amount of space to shrink and the 'Total size after shrink' will be updated. You can't shrink a partition beyond the point where files are located - you may be able to free up space by defragmenting the drive first.

Conversely you can only expand a partition if there is unused space on the drive. If not, the option will be greyed out.

How to reset Windows 10 and refresh Windows 8

If your PC is having problems and you don't wish to lose your personal files by wiping your hard drive, then you might want to refresh or reset your PC through Windows 8 or 10. The option was introduced with the launch of Windows 8 and carried through to Windows 10 with a slight difference.

How to refresh and reset Windows 8

In Windows 8, you'll have two separate options: Refresh and Reset. These two options are fundamentally different. Both options can be found within Settings > Change PC settings > Update and recovery > Recovery.

If you're looking to keep your personal files and settings, but want to have a fresh Windows install, you'll want to refresh your PC.

Do note that a refresh will remove all programs and apps you've installed on your machine, but will keep the Windows-default programs intact.

If you're on Windows 8.1, you will be 'refreshed' to Window 8. You can easily upgrade to Windows 8.1 after the refresh is complete.

A reset reinstalls Windows and deletes all your files, settings and programs. We suggest performing this if you have previously backed up all your files and don't mind transferring your personal files.

How to reset Windows 10 

Windows 10 has a slightly different approach and might confuse those coming from Windows 8. Microsoft removed the refresh option and has instead combined the refresh and reset options into one setting.

How to reset Windows 10

To find the option, open the Start Menu, click on Settings > Update & security > Recovery > Get started (under the Reset this PC option).

Upon selecting the option, you'll be presented with three separate options:

  • Keep my files
  • Remove everything
  • Restore factory settings (not available on all PCs)

'Keep my files' saves your personal files but deletes your settings, drivers and programs, whilst also reinstalling Windows 10.

'Remove everything' also gets rid of your personal files and 'Restore factory settings' does the same actions as 'Remove everything', but also resets your PC to the version of Windows which came with your machine. This option will only be available to those who bought a pre-built PC or laptop which came with Windows already pre-installed.

A full list of what these options do can be found on Microsoft's website.

Follow Jim Martin and @PCAdvisor on Twitter and add Jim to your Google+ circles.