The fastest way depends on what you remember
If you can still log in to your computer but forgot the password you use elsewhere, you can change it from your Settings or System Preferences without needing to prove who you are. If you cannot log in at all, the path forward depends on whether you set up a recovery email, a phone number, or security questions — and whether you are on Windows or Mac.
The difference matters because Windows and Mac store passwords differently and offer different recovery routes. Windows lets you reset through a Microsoft account if you set one up; Mac uses your Apple ID. If you never connected either account to your computer, you will need to use a recovery key you may have saved, or you may need to restart your computer from scratch.
Key Takeaways
- If you can log in but forgot your password, you can change it in Settings (Windows) or System Preferences (Mac) without proving your identity.
- If you cannot log in, Windows will show you a "Reset password" link on the login screen if you set up a Microsoft account or recovery email.
- Mac requires your Apple ID and password to reset a forgotten login password; if you do not remember your Apple ID password either, you will need to recover it through Apple's website first.
- If you set up two-factor authentication or security questions, have that phone or those answers ready before you start.
- If none of these routes work, you may need to restart your computer using recovery mode, which erases your files.
Resetting your password when you can still log in
On Windows: Click the Start button, then Settings (the gear icon). Go to Accounts, then Password. Click "Change your password" and type your current password. Then type your new password twice and click Next. You do not need to prove who you are — Windows trusts that you are sitting at the computer.
On Mac: Click the Apple menu, then System Settings (or System Preferences on older versions). Go to General, then Password. Type your current password when prompted, then type your new password twice and click Change Password. Like Windows, Mac assumes you are the person at the keyboard.
Resetting a Windows password you cannot log in to
When you reach the Windows login screen and cannot remember your password, look for a link that says "Reset password" or "I forgot my password." This link only appears if you set up a Microsoft account or gave Windows a recovery email address when you created your user account.
Click that link. Windows will ask you to verify your identity — usually by sending a code to the email address or phone number you registered. Check your email or text messages, enter the code, and then create a new password. You can then log in with the new password.
If you do not see a reset link on the login screen, it means you set up a local account (not connected to Microsoft) and did not add a recovery email. In that case, you will need to use a password reset disk if you created one earlier, or restart your computer in recovery mode. Both of these routes are covered below.
Resetting a Mac password you cannot log in to
At the Mac login screen, you cannot reset your password directly. Instead, restart your Mac and hold Command + Q when ready after you hear the startup sound. This opens Firmware Password Utility (on Intel Macs) or enters Recovery Mode (on Apple Silicon Macs). The exact steps differ slightly between models, so check Apple's support page for your specific Mac type before you start.
Once in Recovery Mode, go to Utilities menu and select "Reset Password." Choose your user account from the dropdown, then enter your Apple ID and password. Mac will let you create a new login password. If you do not remember your Apple ID password, you will need to recover it through Apple's website (appleid.apple.com) before you can proceed.
If you do not have access to your Apple ID, you may need to erase your Mac and start over, which deletes all your files. This is a last resort and should only be done if you are certain you have no other way to recover your account.
Using a password reset disk on Windows
If you created a password reset disk on a USB drive or external drive before you forgot your password, you can use it to create a new password without needing email or a Microsoft account.
Insert the reset disk into your computer. At the Windows login screen, click "Reset password." Windows will ask you to insert the disk and will guide you through creating a new password. Once you have set a new password, you can log in normally.
If you never created a reset disk, you cannot make one now — you would need to be logged in to create it. This is why setting one up when you first create your account is useful, even if you think you will never need it.
What to do if you have two-factor authentication turned on
If you set up two-factor authentication on your Microsoft or Apple account, you will need access to your phone or recovery codes to reset your password. Have your phone nearby before you start the reset process.
When you go through the password reset flow, you will be asked to confirm your identity using a code sent to your phone or by answering security questions. If you no longer have access to that phone, look for an option to use a recovery code instead — these are usually printed or saved when you first turned on two-factor authentication. If you cannot find your recovery codes, you may need to contact Microsoft or Apple support directly.
When you need to restart your computer from scratch
If you cannot log in, do not have a recovery email or Microsoft account, do not have a reset disk, and cannot access your Apple ID, you may need to erase your computer and reinstall the operating system. This deletes all your files and programs.
On Windows: Restart your computer and press F11 (or F12, depending on your model) repeatedly during startup. This opens the recovery menu. Choose "Reset this PC" and select "Remove everything." Windows will guide you through reinstalling the operating system. You will need a working internet connection.
On Mac: Restart and hold Command + R during startup to enter Recovery Mode. Go to Utilities, then Disk Utility. Select your hard drive and click Erase. Then go back and select "Reinstall macOS." This process takes 30 minutes to an hour and requires internet access.
Before you erase your computer, make sure you have backed up any files you want to keep on an external drive or cloud storage. Once you erase, those files are gone.
Frequently Asked Questions
Can I reset my password without a recovery email or phone number?
On Windows, you can if you created a password reset disk before you forgot your password. On Mac, you need your Apple ID password — if you do not have that either, you will need to recover your Apple ID through Apple's website first. If neither of those options is available, you will need to erase and reinstall your operating system.
What if I forgot both my computer password and my Microsoft or Apple ID password?
Go to the Microsoft or Apple website on another device and use the "Forgot password" option there to reset your account password. Once you have regained access to your account, you can use it to reset your computer password. This is why having a recovery email or phone number on your account matters — it is your way back in.
How long does it take to reset a password?
If you have a recovery email or phone number set up, the reset usually takes 5 to 10 minutes. If you need to use Recovery Mode or restart from scratch, plan for 30 minutes to an hour, plus the time it takes to reinstall programs and restore files from a backup.
Will resetting my password delete my files?
No — changing your password in Settings or System Preferences keeps all your files intact. Using Recovery Mode to reset a forgotten password also keeps your files. Only if you erase and reinstall your operating system will your files be deleted, and only if you do not have a backup.
Should I write my password down somewhere safe?
Writing it on paper and storing it in a locked drawer is safer than using the same password everywhere or writing it on a sticky note on your monitor. A password manager (like Bitwarden or 1Password) is even better — it stores passwords encrypted and you only need to remember one master password. Just make sure you do not forget that master password.