At certain times, you may find it necessary to restore your Windows computer to factory settings. Maybe you ran into malware and need a fresh start, or perhaps you plan to sell your computer and wipe it clean.

Whatever the reason, we'll show you what to do. Here's how to factory reset your HP laptop.

First: Don't Forget to Back Up!

Before you perform a factory reset, you should make sure you have a backup of your files. In most cases, performing a factory reset will remove all data from your machine.

See our guide to backing up Windows 10 for how to do this.

Factory Reset Your HP Laptop Using Recovery Manager

Until 2018, HP computers came with a tool called HP Recovery Manager. You can use this to restore your laptop to its default settings, but it comes with a few stipulations. To see if you have it installed, open the Start menu and search for Recovery Manager.

If you don't see it, your computer may be too new and thus doesn't include the software. You also can't use this option if you've deleted the HP Recovery partition on your system's hard drive. Finally, HP's recovery tools only work for the version of Windows that your computer shipped with. Thus, if you bought your laptop with Windows 8.1 and later upgraded to Windows 10, you can't use the utility.

Should you fulfill all these conditions, you can use HP Recovery Manager to restore your PC to its default state. The app will walk you through the process, including backing up your files first. Once it completes, you can set up Windows again.

See HP's page on Recovery Manager and the below HP Support video for help with this process. If your computer doesn't have Recovery Manager, HP recommends using the built-in Windows options (covered below).

Factory Reset an HP Laptop Using Pre-Boot Options

If you can't boot into Windows normally, or you don't have the Recovery Manager available, you can instead turn to pre-boot options. When you start your laptop, you'll see some text on-screen telling you what keys you need to press to access the startup environment. On my HP laptop, this is the Esc key, but it may be different for yours.

As soon as you boot your computer, rapidly press the button until it jumps to an options screen. You may see a key that corresponds to a Recovery option of some sort. On my laptop, I had to press F10 to access the BIOS Setup menu first.

HP Laptop Boot Menu

After this, in the Security section, I found an option labeled Secure Erase. This allows you to erase the entire hard drive, useful for when you plan to give your computer away.

HP Bios Secure Erase

Be careful what you choose here. Your computer may not include an option to reinstall Windows through this menu. The above Secure Erase option wipes the hard drive clean, meaning you would have to reinstall Windows yourself.

Windows 10's Factory Reset Options

If you don't want to use any of the above methods, or find that they didn't work, you can turn to the universal reset options in Windows 10. No matter what kind of laptop you have, you can use these to get your computer back to its default state.

See our guide on factory resetting your Windows 10 computer for all you need to know on this. You can use the Reset this PC options in Settings, open the advanced startup options to reboot into a recovery environment, or even reinstall Windows with installation media.

All You Need to Factory Reset an HP Laptop

Now you know your options for resetting an HP laptop to factory settings. It seems HP has acknowledged that Windows 10 has great factory reset options built in, making old-school recovery methods less important. You're probably best off using those, but it's good to know what HP includes so you have all the bases covered.

If you forgot your Windows password, you don't have to go through a factory reset. See our guide to resetting a lost Windows 10 password on how to recover it.