This article explains how to format a computer hard drive, which involves deleting all data stored on it, including the operating system, using the Windows or macOS operating system. The process of formatting a computer involves deleting the content stored on the hard drive (or hard drives) and reinstalling the operating system, Windows or macOS, from scratch. This is a very useful procedure if your computer is malfunctioning, but also if you intend to sell it or give it away and don't want to run the risk that someone might get hold of your personal data. Both Windows and macOS integrate tools that allow you to format any memory unit quickly and easily without having to be an expert.
Steps
Method 1 of 3: Windows 10

Step 1. Back up your data
Although formatting the hard drive of a Windows 10 computer is a very simple operation, remember that all apps, programs, configuration settings and your personal files will be permanently deleted to allow you to install Windows from scratch. However, backing up any files you want to keep is also very simple and you can do it using the tools built right into the operating system. Check out this article to find out how to back up data in Windows 10 using a CD, DVD, external hard drive, or clouding service.

Step 2. Launch the Windows Settings app by clicking on the icon
It features a gear and is visible within the "Start" menu.

Step 3. Click the Update & Security icon
It is characterized by two curved arrows.

Step 4. Click on the Restore tab
It is displayed in the left panel of the page.

Step 5. Click on the Get Started button located in the "Reset PC" section
It is the first button visible at the top of the right window pane.

Step 6. Click on the Remove All option
It is the second entry listed in the blue pop-up that appeared.

Step 7. Click on Remove files and clean the drive
It is the second option displayed in the menu. This is the option you will need to select if you want your computer hard drive to be fully formatted, as the other choice only deletes the operating system, then reinstalls it without physically formatting the computer hard drive.
- Formatting your computer hard drive is very important if you are going to sell or give it away. Formatting a memory drive makes the process of restoring data by an attacker much more complex. If you want to keep the computer, you can also choose the option Only remove my personal files. In this case, the hard drive will not be formatted.
- Alternatively, you can use a third-party program to perform hard drive formatting - for example, an app like DBAN (Darik's Boot and Nuke). If you have chosen to use a third-party program, you will need a USB drive or a Windows 10 installation DVD to be able to reinstall your operating system. See this article to find out how to format a hard drive using DBAN.

Step 8. Click the Next button to skip the warning screen
If a message appears to warn you that your computer's original operating system has been upgraded to Windows 10, it means that this latest version of Windows will be reinstalled and you will not be able to revert to the previous one.

Step 9. Click the Reset button to format your computer hard drive
Depending on the performance and capacity of the memory unit to be formatted, this step may take a few minutes to several hours to complete.
If you are using a laptop, make sure it is plugged into the mains so that the formatting process is not interrupted

Step 10. Click the Continue button when the formatting procedure is complete
At this point, the hard drive of the computer is completely empty. If you want to reinstall Windows, follow the instructions that will appear on the screen.
Method 2 of 3: Windows 8.1

Step 1. Back up your data
Since formatting a computer hard drive will erase all the data it contains, it is very likely that before continuing you will want to create a backup copy of all the files you wish to keep. Check out this article to find out how to back up your data before continuing further.
If the computer was originally equipped with Windows 8, instead of Windows 8.1, the formatting and recovery procedure of the operating system will reinstall Windows 8. In any case, do not worry: at the end of the recovery you will be asked if you want to install the free upgrade to Windows 8.1

Step 2. Move the mouse cursor to the lower right corner of the screen
The Windows Charms Bar will appear.

Step 3. Click the Settings icon
It features a gear and is listed within the charms bar that appears.

Step 4. Click the Change PC Settings link
It is displayed at the bottom of the appeared menu.

Step 5. Click the Update and Repair tab
It is displayed at the bottom of the left side panel of the window.

Step 6. Click on the Restore tab
It is located in the left panel of the newly appeared screen.

Step 7. Click the Get Started button in the "Remove everything and reinstall Windows" section
It is located in the center of the right window pane. Make sure you don't accidentally click the "Get Started" button in a section other than the one indicated.

Step 8. Click the Next button
This will confirm that you want to delete all data stored on your computer: apps, files, documents and settings.

Step 9. Select the hard drive (or hard drives) you want to format
If you want to format only the disk on which the Windows 8.1 installation is present, choose the option Only the drive where Windows is installed. To format all memory drives on your computer, select the item All units.

Step 10. Click the Remove All button
It is the second option listed in the pop-up that appeared. The selected memory drives will be fully formatted.
- If you want to keep the computer, you can also choose the option Only remove my personal files. In this case, the hard drive will not be formatted.
- Alternatively, you can use a third-party program to perform hard drive formatting - for example, an app like DBAN (Darik's Boot and Nuke). This type of program guarantees that no one will be able to recover the data that was present inside the hard drive. Remember that if you have chosen to use this solution, you will need to have a USB drive or Windows installation DVD available in order to reinstall the operating system. Check out this article to find out how to format a hard drive using DBAN.

Step 11. Click the Recover button to format your computer hard drive
Depending on the performance and capacity of the memory unit to be formatted, this step may take a few minutes to several hours to complete.
- If you are using a laptop, make sure it is plugged into the mains so that the formatting process is not interrupted.
- At the end of the format procedure, the computer will automatically restart and you will be prompted to reinstall the Windows operating system. If you want to continue, just follow the instructions that will appear on the screen.
Method 3 of 3: macOS

Step 1. Back up your data
Formatting your Mac's memory drive will erase all the data it contains, so first make a backup copy of any files you want to keep. Read this article to find out how to back up your data using Time Machine or iCloud.

Step 2. Turn on your Mac and hold down the key combination ⌘ Command + R
If the computer is already running, restart it and hold down the indicated keys as soon as the system starts. The computer will start in "macOS Recovery" mode.
When you see the Apple logo or the startup screen appear on the screen, you can release the keys you are pressing

Step 3. Select the Disk Utility option
It is the last item listed in the "macOS Utilities" window.

Step 4. Click the Continue button
It is located in the lower right corner of the window.

Step 5. Click on the View menu
It is listed in the bar that appears at the top of the screen.

Step 6. Click on the Show all devices option
This will show all the hard drives connected to the Mac in the left pane of the window.

Step 7. Select the disk you want to format
For example, if you need to format your Mac's main drive - the one on which the operating system is installed - select the first memory drive listed at the top of the list (in the "Internal" section).

Step 8. Click the Initialize button
It is displayed in the upper center of the "Disk Utility" window.

Step 9. Select the settings to perform disk formatting
- "Name": enter the name you want to give to the disc.
- "Format": Unless you have a good reason not to, you can use the default import of this entry which is APFS.
- "Pattern": select the option GUID Partition Map.

Step 10. Click the Erase button to format the indicated disk
You may need to provide your Apple ID or password. Once the formatting and disk initialization is complete, you will be redirected to the "Disk Utility" dialog box.
If there are other memory drives on your Mac, you can format them now using the options provided in the "Disk Utility" window

Step 11. Close the "Disk Utility" window
Click on the red circular icon, located in the upper left corner of the window.