The fastest way depends on what you remember and what operating system you have
If you cannot log in to your laptop, a full reset is possible on both Windows and Mac, but the steps differ and the time required varies widely. Windows lets you reset through your Microsoft account or a local account recovery method, while Mac requires your Apple ID or a recovery key. The catch: a reset erases everything on the drive unless you have a backup, and some methods take 20 minutes while others take several hours. Before you reset, check whether you can use a password hint, recover through email, or boot into safe mode — those routes preserve your files.
The path you take depends on three things: whether you remember the email or phone number tied to your account, whether the laptop will still power on, and whether you have access to another computer to create recovery media. If you have the email or phone number, you can recover your password without erasing anything. If you do not, a factory reset is the remaining option, but it wipes all files, programs, and settings.
Key Takeaways
- Windows 10 and 11 let you reset your password through your Microsoft account email without erasing files, which is faster than a full factory reset.
- Mac requires your Apple ID password or a recovery key to reset; if you have neither, you will need to erase the drive and reinstall the operating system.
- A full factory reset erases all files, programs, and settings, so back up your data first if the laptop still powers on and you can access another device.
- If you are locked out of your Microsoft or Apple account as well, password recovery through email or phone number is usually the next step.
- Some laptops have a BIOS or firmware password separate from the login password; resetting the operating system will not remove that barrier.
Windows: Resetting your password without erasing files
On Windows 10 or 11, if you used a Microsoft account to set up the laptop, you can reset the password from the login screen without losing your files. At the login screen, click "I forgot my password" below the password field. Windows will ask you to verify your identity using a phone number or backup email address tied to your Microsoft account. You will receive a code by text or email, enter it, and then create a new password. This process takes 10 to 15 minutes and leaves all your files, programs, and settings intact.
If you set up the laptop with a local account (not a Microsoft account) and you cannot remember the password, you have fewer built-in options. You can try the password hint if one appears on the login screen. If that does not work, you will need to either reset the password using another administrator account on the same laptop, or proceed to a full factory reset, which erases everything. A local account recovery is harder because Windows has no way to verify your identity remotely without a Microsoft account backing it up.
Windows: Full factory reset when you have no other option
If you cannot recover your password through your Microsoft account and no other administrator account exists on the laptop, a factory reset is the remaining path. Power off the laptop completely. Turn it back on and when ready press the key for boot options — this is usually F12, F2, Esc, or Del, depending on the manufacturer (Dell, HP, Lenovo, Asus, and others each use different keys). Look for an option to boot from USB or recovery media. If you see a menu, select the USB option. If the laptop boots normally to the login screen, try restarting and pressing the key again, holding it down longer this time.
If you do not have a Windows installation USB or recovery drive, you will need to create one on another computer. read the Windows Media Creation Tool from Microsoft's website, plug a blank USB drive into another laptop or desktop, and follow the tool's prompts to create a bootable Windows installation drive. This takes 15 to 30 minutes. Then plug that USB drive into your locked laptop, boot from it, and select "Repair your computer" or "Troubleshoot". Choose "Reset this PC" and select "Remove everything". The reset process takes 30 to 90 minutes depending on drive size and speed. When it finishes, the laptop will boot to a fresh Windows setup screen with no files, programs, or user accounts.
Mac: Resetting with your Apple ID or recovery key
On a Mac, if you forgot your login password, restart the laptop and hold Command + Q when ready after the startup sound. This opens the login window. Click the question mark icon next to the password field, or wait 60 seconds for a password hint to appear if one was set. If the hint does not help, click "Reset Password" and enter your Apple ID email and password. Apple will send a verification code to a trusted device or phone number. Enter the code, create a new password, and you can log in. This preserves all your files and takes about 10 minutes.
If you do not remember your Apple ID password either, you can recover it at iforgot.apple.com using your email address or phone number. If you set up two-factor authentication on your Apple account, you will need access to a trusted device to complete the recovery. If you have a recovery key (a 16-character code Apple generated when you first set up two-factor authentication), you can use that instead of a trusted device. Keep this recovery key in a safe place separate from your laptop — it is your backup if you lose access to both your password and your trusted devices.
Mac: Full erase and reinstall when recovery is not possible
If you cannot access your Apple ID and have no recovery key, you must erase the drive and reinstall macOS. Restart the Mac and hold Command + R when ready after the startup sound to enter Recovery Mode. The Mac will boot into a recovery environment with utilities visible. Click "Disk Utility", select your main drive (usually called "Macintosh HD"), and click "Erase". Choose a format (APFS for newer Macs, Mac OS Extended for older ones) and confirm. Erasing takes 5 to 15 minutes and removes all files permanently.
After erasing, close Disk Utility and click "Reinstall macOS". The Mac will read and install a fresh copy of the operating system — this takes 30 to 90 minutes depending on your internet speed and drive speed. When installation finishes, the Mac will boot to the setup screen. You can create a new user account and log in without a password requirement, though you will be prompted to set one during setup. At this point, the laptop is reset and ready to use, but all previous files and programs are gone.
Protecting your data before a reset
If your laptop still powers on and you can reach the login screen, try to back up your files before resetting. If you have another computer, you can sometimes boot the locked laptop into a recovery or safe mode that lets you access files without logging in. On Windows, try holding Shift while clicking the power button on the login screen, then selecting "Restart" — this sometimes boots into a recovery menu where you can access files. On Mac, restart and hold Command + S for single-user mode, which may let you access the file system and copy files to an external drive.
If the laptop will not boot at all or you cannot access files through recovery mode, your data is at risk during a factory reset. An external hard drive or cloud backup made before you lost access is your only safety net. If you have neither, consider whether the files are worth paying a data recovery service to retrieve after the reset — some can recover data from erased drives, though the cost is typically $300 to $1000 and recovery is not may provide on all drive types.
BIOS or firmware passwords are separate from login passwords
Some laptops have a second password layer at the BIOS or firmware level — this password appears before the Windows or Mac logo appears during startup, and resetting the operating system will not remove it. If you see a password prompt before the Windows or Mac logo appears during startup, you are dealing with a firmware password. These are set by the manufacturer or a previous owner and require either the original password, a manufacturer master password (which varies by brand and model), or a hardware reset that may require opening the laptop.
If you encounter a BIOS password, check your laptop's manual or the manufacturer's support site for your specific model. Dell, HP, and Lenovo each have different procedures, and some allow a certain number of incorrect attempts before locking you out for a period of time. If you own the laptop and can prove it with a receipt or serial number, the manufacturer's support team may be able to help you reset the firmware password, though they will ask for proof of purchase and may charge a fee.
Frequently Asked Questions
Will resetting my laptop delete my files?
A full factory reset erases everything. However, on Windows, resetting your password through your Microsoft account does not erase files. On Mac, resetting your password through your Apple ID also preserves files. Only choose "Remove everything" or erase the drive if those password recovery methods do not work.
Can I reset a laptop without the original password or email access?
If you cannot access the email or phone number tied to your Microsoft or Apple account, password recovery becomes much harder. You can still do a full factory reset on either system, but you will lose all files. Contact the manufacturer's support team with proof of ownership — they may have additional options depending on the laptop model.
How long does a full factory reset take?
A full reset typically takes 30 to 90 minutes from start to finish, depending on the drive size, drive speed, and internet connection. Creating a Windows installation USB on another computer adds another 15 to 30 minutes if you do not already have one.
What if I forgot my Apple ID password too?
Go to iforgot.apple.com and enter your Apple ID email address. Apple will send a verification code to a trusted phone number or device. If you have a recovery key saved from when you first set up two-factor authentication, you can use that instead. If you have none of these, you will need to do a full erase and reinstall.
Can I reset a laptop that will not turn on?
If the laptop will not power on at all, the issue is likely hardware-related, not a forgotten password. Try plugging it in for 30 minutes, then holding the power button for 10 seconds. If it still will not start, contact the manufacturer or a repair technician — a password reset will not help a laptop that cannot boot.