The fastest way depends on whether you remember any password at all
If you can log in to your computer but forgot the password you use to unlock it, Windows and Mac both let you reset it from the login screen itself—no recovery disk or second account needed. If you cannot log in at all, the process is longer and depends on which operating system you use and whether you set up a recovery method beforehand.
The method that works for you also depends on whether your computer is connected to a Microsoft account (Windows) or an Apple ID (Mac), or whether you use a local account with no internet connection. Start with the section that matches your situation.
Key Takeaways
- On Windows, if you can reach the login screen, click "I forgot my password" and answer your security questions or use a recovery email to reset it in minutes.
- On Mac, if you remember your Apple ID password, you can reset your computer password from the login screen using your Apple ID.
- If you cannot log in and have no recovery method set up, you will need to restart your computer in Safe Mode or Recovery Mode, which takes longer but does not require external tools.
- Windows computers linked to a Microsoft account can also be reset through the Microsoft account website if you have access to the recovery email or phone number on file.
- Mac computers can be reset using Recovery Mode, which you access by restarting and holding Command+R during startup.
Resetting your password on Windows from the login screen
When you reach the Windows login screen and cannot remember your password, look for the text "I forgot my password" below the password field. Click it. Windows will ask you to answer the security questions you set up when you created your account—usually three questions about things like your first pet's name or the city where you were born.
Answer all three correctly, and Windows will let you create a new password right there. Type a new password twice to confirm it, then press Enter. You can now log in with the new password. This method works on any Windows 10 or Windows 11 computer, whether your account is linked to a Microsoft account or is a local account.
If you do not remember the answers to your security questions, Windows offers a second path: if your account is connected to a Microsoft account, you can click "Reset password" and Windows will send a code to the recovery email address on file. Check that email, enter the code on the login screen, and you can set a new password.
Resetting your password on Mac from the login screen
On a Mac login screen, if you cannot remember your password, click the question mark icon next to the password field (it appears after you click in the field). Mac will show you a password hint if you created one when you set up your account.
If the hint does not help, you have a second option: click "Reset Password" below the password field. Mac will ask you to enter your Apple ID password. If you know your Apple ID password, enter it, and Mac will let you create a new computer password when ready. This works on any Mac running macOS 10.15 or later.
If you do not know your Apple ID password either, you will need to use Recovery Mode (see the section below).
Using Windows Recovery Mode when you cannot log in
If you cannot reach the login screen at all—for example, if your computer will not start or you are locked out before the login screen appears—restart your computer and watch for a prompt to enter Setup or Recovery Mode. On most Windows computers, you press F11, F12, or Delete during startup, though the exact key varies by manufacturer.
Once in Recovery Mode, select "Reset this PC" and choose whether to keep your files or remove everything. Windows will walk you through the steps to create a new local account with a new password. This erases your old password but does not delete your personal files if you choose to keep them. The process takes 20 to 45 minutes depending on your computer's speed.
If you are not sure which key to press during startup, restart your computer and look at the first screen that appears—it usually says "Press [key] to enter Setup" or "Press [key] for Recovery Options." Write down the key and try it on the next restart.
Using Mac Recovery Mode when you cannot log in
On a Mac, restart your computer and when ready hold down Command+R. Keep holding until you see the Apple logo or a spinning globe. This takes you to Recovery Mode, where you can reset your password without erasing anything on your computer.
In Recovery Mode, click "Utilities" in the menu bar, then select "Reset Password." Choose your account from the list, then click "Reset." Mac will ask you to enter your Apple ID password. Once you do, you can create a new computer password. Click "Save" and restart your computer—you can now log in with the new password.
If you do not know your Apple ID password, you can reset that through the Apple ID website (iforgot.apple.com) using your recovery email or phone number. Once you reset your Apple ID password, return to Recovery Mode and use the new Apple ID password to reset your computer password.
Resetting a Windows password through your Microsoft account online
If your Windows computer is linked to a Microsoft account and you have access to the recovery email or phone number on file, you can reset your password without touching the computer at all. Go to account.microsoft.com on any other device, click "Security" in the left menu, then select "Change your password."
Microsoft will ask you to verify your identity by sending a code to your recovery email or phone. Enter the code, create a new password, and save it. The next time you try to log in to your Windows computer, use this new password. This method works even if your computer is offline—Windows will sync the new password the next time it connects to the internet.
What to do if you set up a recovery key or backup codes
If you created a recovery key or backup codes when you set up your Microsoft account or Apple ID, you can use those instead of answering security questions or accessing a recovery email. On Windows, when you click "I forgot my password," you can choose to enter a recovery key instead of answering questions. On Mac, you can use a recovery key in Recovery Mode the same way you would use your Apple ID password.
Recovery keys are long strings of characters (usually 24 to 48 characters) that you should have saved in a safe place when you created them. If you saved yours in a password manager, email, or document, retrieve it and have it ready before you start the reset process. If you cannot find your recovery key, use one of the other methods described above.
Frequently Asked Questions
Will resetting my password delete my files?
No, unless you choose to erase everything during the reset process. On both Windows and Mac, you can reset your password and keep all your files, photos, and programs intact. Only choose the "remove everything" option if you are selling the computer or want a completely fresh start.
What if I do not remember my security questions or recovery email?
On Windows, if you cannot answer your security questions and do not have access to your recovery email, you will need to use Recovery Mode to reset your computer. On Mac, if you do not know your Apple ID password, you can reset it at iforgot.apple.com using your recovery phone number or a trusted device, then use that new password in Recovery Mode.
Can I reset my password if my computer is not connected to the internet?
Yes. On Windows, security questions work offline, so you can reset your password at the login screen without internet. On Mac, Recovery Mode also works offline. However, if your account is linked to a Microsoft account or Apple ID and you need to use a recovery email or phone code, you will need internet access on another device to receive that code.
How long does it take to reset my password?
If you use the login screen method (answering security questions or using a recovery email), it takes 5 to 10 minutes. If you need to use Recovery Mode, allow 20 to 45 minutes for Windows or 10 to 20 minutes for Mac, depending on your computer's speed and how much data it has to process.
Do I need to call a technician to reset my password?
No. Both Windows and Mac are designed so you can reset your password yourself using the methods described above. You only need outside help if your computer has a hardware problem (like a broken screen) that prevents you from seeing the login screen, or if you have set up additional security that you cannot access.