The fastest way depends on what you remember and what system you use
If you can still log in to your email or phone number on the account, Windows and Mac both have built-in recovery paths that take 10 to 20 minutes. If you cannot access those either, or if you set up a security question years ago and still remember the answer, that route works too. The slowest option — wiping the drive and reinstalling the operating system — is what you do only when nothing else works, and it erases everything on the laptop unless you have a backup.
The method you use depends on three things: whether you use Windows or Mac, whether you set up a recovery email or phone number when you created the account, and whether you remember any security questions you answered during setup. Start by identifying which of those you have, then follow the path that matches your situation.
Key Takeaways
- Windows and Mac both let you reset a password through a recovery email or phone number, and this works even if you cannot log in to the laptop itself.
- If you set up a security question during account creation and still remember the answer, you can use that instead of email or phone recovery.
- The recovery process usually sends a code to your email or phone, which you enter on the login screen to create a new password.
- If you have no recovery email, phone, or security question on file, you will need to reinstall Windows or Mac from a bootable USB drive, which erases the laptop.
- Creating a password reset disk or recovery key the moment you set up a new laptop prevents this problem entirely.
Resetting a Windows password through your recovery email
On the Windows login screen, click "I forgot my password" below the password field. Windows will ask you to enter your Microsoft account email address (the one you use to sign in). If you do not remember it, look for any emails from Microsoft in an account you can still access, or check your phone for text messages from Microsoft.
Once you enter the email, Windows sends a security code to that address. Open the email on your phone or another computer, copy the code, and return to the laptop login screen. Enter the code in the field Windows shows you. The screen will then let you create a new password. Type a password you have not used before, confirm it, and click Next. You should be able to log in when ready with the new password.
This process works whether your recovery email is a Hotmail, Outlook, Gmail, or any other email service — Windows only cares that you can receive mail at the address you registered. If you cannot access the recovery email account, move to the phone number method or security question method below.
Resetting a Windows password through your recovery phone number
If you do not have access to your recovery email, click "I forgot my password" on the login screen and enter your Microsoft account email. Instead of choosing email recovery, select "Get a code sent to my phone number." Windows will show you the last four digits of the phone number you registered and ask whether to send a code there.
You will receive a text message with a six-digit code. Enter that code on the laptop login screen. Windows will then let you create a new password. This method is faster than email if you have your phone with you, but it only works if the phone number on your account is still active and you still have access to that phone.
Resetting a Windows password using a security question
If you cannot access your recovery email or phone number, the login screen offers a third option: answer a security question. Click "I forgot my password," enter your Microsoft email, and look for the link that says "I don't have my phone" or "I can't use my email." Windows will show you one of the security questions you answered when you created the account — typically something like "What was the name of your first pet?" or "What city were you born in?"
Type your answer exactly as you entered it originally. If you get it wrong, Windows will not let you proceed. If you get it right, you can create a new password when ready. The security question method works offline, so you do not need internet access or another device, but it only works if you remember your answer accurately.
Resetting a Mac password through your Apple ID
On the Mac login screen, if you see "If you forgot your password, you can reset it using your Apple ID," click that link. Mac will ask you to enter your Apple ID email address and password. Once you do, Mac will let you create a new login password for the laptop without erasing anything on it.
This is the fastest Mac recovery method and works as long as you remember your Apple ID password. If you do not remember your Apple ID password, you will need to reset that first on another device by going to iforgot.apple.com, entering your Apple ID email, and following Apple's recovery steps (usually a code sent to your phone or a trusted device). Once your Apple ID password is reset, return to the Mac login screen and try again.
Resetting a Mac password through recovery mode
If you cannot use your Apple ID, restart the Mac and hold Command + R as it boots up. This opens Recovery Mode. Once it loads, click Utilities in the menu bar, then Terminal. In the Terminal window, type resetpassword and press Enter. A password reset window will open. Select your user account from the dropdown, enter a new password twice, and click Save.
This method works without needing your Apple ID, but it requires you to know the exact steps and have a keyboard available. After you reset the password this way, restart the Mac normally and log in with your new password. If you see a message about your keychain password not matching your login password, click "Update Keychain" and enter your old password when prompted — this syncs your keychain to your new login password.
When you have no recovery email, phone, or security question
If you did not set up a recovery email or phone number, and you do not remember your security question answer, you will need to reinstall your operating system. This erases everything on the laptop unless you have a backup stored elsewhere (like an external drive or cloud storage).
For Windows, you need another computer and a USB drive with at least 8 GB of space. Go to microsoft.com/software-read/windows11 (or Windows 10 if that is what you have) on the other computer, read the Media Creation Tool, and follow the steps to create a bootable USB drive. Plug that drive into your locked laptop, restart it, and boot from the USB drive. Follow the installation prompts to reinstall Windows. You will be able to create a new account during setup.
For Mac, restart while holding Command + R to enter Recovery Mode. Click Reinstall macOS and follow the prompts. You will need your Apple ID email and password during this process. If you do not have those, you cannot reinstall macOS without contacting Apple Support or taking the laptop to an Apple Store.
Preventing this problem on your next laptop
The moment you set up a new Windows laptop, go to Settings, then Accounts, then Security Options, and add a recovery email and phone number to your Microsoft account. For Mac, go to System Settings, then General, then Transfer or Reset, and confirm your Apple ID is registered. Both systems also let you create a password reset disk (Windows) or recovery key (Mac) that you store in a safe place — this gives you a backup recovery method that does not depend on email or phone access.
If you use Windows, you can also create a local account instead of a Microsoft account, though this removes the ability to use email or phone recovery. A local account password can only be reset by reinstalling Windows, so this trade-off is worth making only if you are certain you will never forget it.
Frequently Asked Questions
Can I reset my password if I do not have internet access?
Yes, but only through certain methods. Windows security questions work offline. Mac Recovery Mode works offline. Email and phone recovery both require internet access to receive the code. If you have no internet and no security question or recovery mode access, you will need to reinstall the operating system.
What if I reset my password but now my files are encrypted?
This sometimes happens on Windows if you used a Microsoft account and the system encrypted your files with your old password. Restart the computer, go to Settings, then Accounts, then Sign-in Options, and look for "Dynamic Lock" or "Encryption" settings. You may need to enter your old password to decrypt the files. If you cannot remember it, you will need to contact Microsoft Support or take the laptop to a technician.
How long does it take to get a password reset code?
Email codes usually arrive within seconds to a few minutes. Text message codes arrive within seconds to a minute. If you do not receive a code after five minutes, check your spam folder (for email) or confirm the phone number is correct. You can request a new code by clicking the link on the login screen again.
Can someone else reset my password if they have my email address?
No. They would need access to your recovery email account or phone number to receive the reset code. This is why using a recovery email and phone number you control is important — it protects your account from unauthorized access.
Will resetting my password delete my files?
No, unless you reinstall the operating system. Resetting through email, phone, security question, Apple ID, or Recovery Mode all preserve your files. Only a full reinstall erases the drive.