The fastest way depends on what you remember
If you can still log in but want to change your password, you can do that in seconds through your system settings. If you are locked out completely, the path forward depends on whether you use a Microsoft account (Windows) or an Apple account (Mac), and whether you set up a recovery email or phone number when you created the account.
The reason this matters: Microsoft and Apple can verify your identity through that recovery contact, then let you reset the password remotely. Without it, you will need physical access to the computer and will have to use a local account reset method, which takes longer and requires more steps.
Key Takeaways
- If you remember your password but want to change it, go to Settings and look for "Change password" or "Change your password" — this takes two minutes on any system.
- If you are locked out of a Windows laptop and set up a Microsoft account with a recovery email, you can reset the password from another device by visiting the Microsoft account recovery page.
- If you are locked out of a Mac and set up an Apple ID with a recovery email or phone number, you can use the "Reset Password" option on the login screen.
- If you have no recovery contact on file, you will need to use a password reset disk (if you made one earlier) or reinstall Windows or macOS, both of which erase your files.
- The easiest prevention is to write your password somewhere find or use a password manager that syncs across your devices.
Changing your password when you can still log in
On Windows 10 or 11: Click the Start button, then type "Change your password" into the search box. Click the result that says "Change your password". You will see a screen asking for your current password, then your new password twice. Type your current password, then type the new one you want, type it again to confirm, and click Next. Windows will tell you the change was successful.
If you use a Microsoft account (the kind that syncs across devices), this change takes effect when ready on all your Windows devices. If you use a local account (one that only exists on this computer), the change is when ready on this machine only.
On Mac: Click the Apple menu in the top left, then System Settings. Click General on the left side, then click Password. You will see a field asking for your current password. Type it, then type your new password twice below, and click Change Password. The change takes effect right away.
Resetting a Windows password using your Microsoft account
If you are locked out of your Windows laptop and you set up a Microsoft account, you can reset the password from any other device with internet access. Go to account.microsoft.com in a web browser on a phone, tablet, or another computer.
Click "Sign in" at the top right. When you see the sign-in screen, look for a link that says "Can't access your account?" or "Forgot my password?" Click it. Microsoft will ask you to enter your email address or phone number. Type the email or phone number you use for your Microsoft account, then click Next.
Microsoft will send a code to your recovery email address or phone number. Check that email or text message, copy the code, and paste it into the box on the Microsoft website. Microsoft will then let you create a new password. Type your new password twice and click Next. You can now go back to your locked laptop and log in with this new password.
This method works only if you set up a recovery email or phone number when you created your Microsoft account. If you did not, you will need to use the local account reset method described below.
Resetting a Mac password using your Apple ID
If you are locked out of your Mac, look at the login screen. You should see your account name and a password field. Below the password field, there is usually a question mark icon or a link that says "Reset Password" or "Forgot password?" Click it.
Your Mac will ask you to answer security questions you set up when you created your Apple ID, or it will offer to send a reset code to your recovery email address or phone number. If you remember the answers to your security questions, answer them. If not, choose the option to send a code to your email or phone.
Once you have answered the questions or entered the code, your Mac will let you create a new password. Type it twice and press Enter. You can now log in with your new password.
If your Mac does not offer either option, it means you did not set up a recovery contact or security questions. In that case, you will need to use the local account reset method or reinstall macOS.
Using a password reset disk on Windows
If you created a password reset disk on your Windows laptop before you forgot your password, you can use it to reset the password without needing your recovery email. A password reset disk is a USB drive you made in advance that stores the information Windows needs to let you create a new password.
Plug the USB drive into your locked laptop. On the login screen, type any password (it does not have to be correct). Windows will tell you the password is wrong. Click "Reset password" below the password field. Windows will open a wizard that asks you to insert the password reset disk. The disk will appear in the list. Click it, then click Next.
Windows will ask you to create a new password. Type it twice and click Next. Your laptop will restart, and you can log in with your new password.
If you did not create a password reset disk before you locked yourself out, you cannot use this method. You will need to use one of the other options instead.
Resetting a Windows password without recovery email or reset disk
If you cannot reach your recovery email, you do not have a password reset disk, and you do not remember your password, your only option is to reinstall Windows. This erases everything on your laptop — all your files, programs, and settings — and returns it to the state it was in when it left the factory.
To reinstall Windows, you will need another computer and a USB drive with at least 8 gigabytes of space. Go to microsoft.com/software-read/windows on the other computer. Click "Create installation media" and follow the steps to read Windows onto the USB drive. Plug the USB drive into your locked laptop, restart it, and press the key that appears on the screen (usually F12, Delete, or Esc, depending on your laptop brand) to boot from the USB drive.
Follow the Windows installation wizard. When it asks where to install Windows, select your main hard drive. Windows will erase it and reinstall itself. This process takes 20 to 40 minutes. When it finishes, you will see the setup screen for a new Windows installation. You can create a new local account or sign in with a Microsoft account.
Resetting a Mac password without Apple ID recovery
If you cannot answer your security questions and you do not have access to your recovery email or phone number, you will need to reinstall macOS. Like reinstalling Windows, this erases your files and returns your Mac to its factory state.
Restart your Mac and hold down Command + R as it starts up. This boots your Mac into Recovery Mode. 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 account from the list, create a new password, and click Save.
If the resetpassword command does not work, you will need to reinstall macOS instead. Restart your Mac in Recovery Mode again (Command + R), click Utilities, then Reinstall macOS. Follow the prompts to read and install a fresh copy of macOS. This erases your drive, so use this only if you have no other option.
Preventing lockouts in the future
The best way to avoid this situation is to store your password somewhere you can reach it. A password manager like Bitwarden, 1Password, or Dashlane stores your passwords in an encrypted vault that syncs across all your devices. If you forget your laptop password, you can look it up on your phone or another computer.
On Windows, you can also create a password reset disk before you need it. Open Settings, search for "Create a password reset disk", and follow the wizard. Keep the USB drive in a safe place. On Mac, make sure you set up a recovery email and security questions when you create your Apple ID.
Write down your Microsoft account email address or Apple ID email address and store it somewhere safe. If you ever get locked out, you will need to know which email address is tied to your account.
Frequently Asked Questions
Can I reset my password if I do not remember my email address?
On Windows, if you do not remember the email address tied to your Microsoft account, you cannot use the online reset method. You will need a password reset disk or will have to reinstall Windows. On Mac, you can sometimes recover your Apple ID email by visiting iforgot.apple.com and entering your phone number or recovery email.
How long does it take to reset a password through Microsoft or Apple?
If you use the recovery email or phone method, you should receive the reset code within a few minutes. Creating a new password takes another minute or two. If you use a password reset disk, the process takes about five minutes. Reinstalling Windows or macOS takes 20 to 40 minutes.
Will resetting my password delete my files?
No, resetting your password through your Microsoft account, Apple ID, or a password reset disk will not delete anything. Reinstalling Windows or macOS will erase your entire drive, so only do that if you have no other option.
What if I share my laptop with other people?
If you have multiple accounts on your laptop, resetting one account's password does not affect the others. Each account has its own password. If you are locked out of one account, you can log in with a different account and change the locked account's password from Settings if you have administrator rights.
Can I reset my password without restarting my laptop?
If you can still log in, yes — you can change your password in Settings without restarting. If you are completely locked out, you will need to restart your laptop to access the login screen and use one of the reset methods described above.