The fastest way depends on what you remember and what you set up before
If you forgot your password and are locked out of your computer, your options split into two paths: methods that work right now at the login screen, and methods that require you to have set something up in advance. Windows and Mac handle this differently, and the speed of recovery depends on whether you created a password reset disk, linked a phone number to your account, or set up security questions.
The key difference is that Windows gives you several ways to reset at the login screen itself, while Mac typically requires you to have prepared ahead of time or to use your Apple ID. Neither path is difficult, but knowing which one applies to you saves hours of frustration.
Key Takeaways
- On Windows 10 or 11, you can reset your password at the login screen using a phone number, email address, or security questions if you set those up beforehand.
- If you did not set up a recovery method, Windows lets you create a new local account and transfer your files later, though this takes longer.
- On Mac, you can reset your password using your Apple ID, a recovery key you saved, or by booting into Recovery Mode and creating a new administrator account.
- A password reset disk (Windows) or recovery key (Mac) created before you forgot your password is the fastest recovery method available.
- If you cannot remember your Apple ID password on Mac, you will need to reset that separately through Apple's website before you can use it to unlock your computer.
Windows 10 and 11: Using a recovery phone or email at 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 verify your identity using a phone number or email address you registered with your account when you set it up.
If you registered a phone number, Windows will send a code to that number via text or call. Enter the code on the screen, and Windows will let you create a new password when ready. If you registered an email address instead, check that email for a reset link, click it, and create a new password in your browser.
This method works only if you set up a recovery phone or email before you forgot your password. If you did not, move to the next section.
Windows 10 and 11: Using security questions you set up in advance
Some Windows accounts are set up with security questions — usually three questions like "What was the name of your first pet?" or "What city were you born in?" If you set these up, Windows will display them at the login screen after you click "I forgot my password."
Answer all three questions correctly, and Windows will let you create a new password on the spot. If you cannot remember your answers or did not set up security questions, you will need to use one of the other methods in this article.
Windows 10 and 11: Creating a new local account when you have no recovery method
If you did not set up a phone number, email, or security questions before you forgot your password, you can still regain access by creating a brand-new local account on your computer. This account will have administrator rights, so you can use it to reset your original account password or transfer files from the old account to the new one.
At the login screen, click "Sign-in options" in the bottom left corner. Then click "Reset password." Windows will walk you through creating a new account. You will need to provide a new username and password for this temporary account. Once you log in with it, you can go to Settings > Accounts > Other people and reset the password on your original account, or copy your files to the new account.
Mac: Resetting your password using your Apple ID
On a Mac, the fastest recovery method is usually your Apple ID. At the login screen, enter your username and click the question mark or arrow. After three wrong password attempts, Mac will offer you the option to reset using your Apple ID. Click "Reset it using your Apple ID" and enter your Apple ID email and password.
If you do not remember your Apple ID password, you will need to reset that first on another device or computer. Go to iforgot.apple.com, enter your Apple ID email, and follow Apple's steps to reset it. Then return to your Mac and use the new Apple ID password to unlock your computer.
This method works on any Mac running macOS 10.7 or later, as long as your Mac is connected to the internet.
Mac: Using a recovery key you saved in advance
If you set up two-factor authentication on your Apple ID and saved a recovery key, you can use that key to reset your Mac password without needing to remember your Apple ID password. At the login screen, select "Reset it using a recovery key" and enter the 28-character code you saved.
Recovery keys are usually provided when you first set up two-factor authentication. If you saved yours in a password manager, email, or document, retrieve it now. If you cannot find it, you will need to use your Apple ID method instead.
Mac: Booting into Recovery Mode to create a new administrator account
If you cannot use your Apple ID or recovery key, you can boot your Mac into Recovery Mode and create a new administrator account from there. Shut down your Mac completely. Then turn it back on and when ready hold Command + R until you see the Apple logo or a spinning globe.
Once Recovery Mode loads, click "Utilities" in the menu bar and select "Terminal." Type resetpassword and press Enter. A password reset window will open. Select your Mac from the dropdown, enter a new password, and click "Reset Password." You can now restart your Mac and log in with the new password.
This method works on any Mac, but it requires you to be physically at the computer and to know your username (even if you do not know your password).
Preventing this from happening again: Setting up recovery methods now
Once you have regained access to your computer, spend ten minutes setting up recovery options so you never face this situation again. On Windows, go to Settings > Accounts > Security options and add a recovery phone number or email address. On Mac, make sure two-factor authentication is turned on for your Apple ID and save your recovery key somewhere safe — a password manager, a printed document in a drawer, or a trusted family member's email.
You can also create a password reset disk on Windows by going to Control Panel > User Accounts > Create a password reset disk. On Mac, you can save a recovery key when you set up two-factor authentication in System Settings > [Your Name] > Password & Security. Both of these take less than five minutes and can save you hours later.
Frequently Asked Questions
What if my Windows computer is not connected to the internet?
You can still create a new local account at the login screen without internet. However, if your account is linked to a Microsoft account (rather than a local account), you will need internet to verify your identity. Check whether you see "Sign in with a Microsoft account" or a local username at the login screen. If it is a Microsoft account, you will need to connect to the internet or use the new local account method.
Can I reset my password if I do not have physical access to my Mac?
No. Mac requires you to be at the computer to reset your password using Recovery Mode, or to have set up your Apple ID recovery method in advance. If you are locked out remotely, you will need to contact Apple Support or visit an Apple Store with proof of ownership.
Will resetting my password delete my files?
No. Resetting your password does not touch your files, documents, photos, or any other data on your computer. Your files remain exactly where they are. If you create a new account to regain access, you can copy files from your old account to the new one through the file manager.
What if I see a message saying my account is locked?
On Windows, an account can be temporarily locked after too many wrong password attempts. Wait 30 minutes and try again, or use one of the recovery methods in this article. On Mac, there is no automatic lockout, but if you see a message about your account being disabled, you will need to use Recovery Mode or contact Apple Support.
Can I reset my password without losing access to my programs or settings?
Yes. Resetting your password changes only the password itself. Your installed programs, browser bookmarks, email settings, and all other configuration stays exactly as it was. You will log back in to the same account with the same files and settings, just with a new password.