The fastest way back in depends on what you remember
If you have forgotten your password, your quickest route back depends on whether you use a Microsoft account (Windows) or an Apple account (Mac), and whether you set up a recovery method when you created the account. On Windows, you can reset your password through the login screen if you have internet access and remember the email or phone number tied to your account. On Mac, you can use your Apple ID or a recovery key. If you set up neither of those, you will need to restart your computer in recovery mode and create a new administrator account, which takes longer but does not require remembering anything.
The key difference is that Microsoft and Apple accounts let you reset remotely, while local accounts (Windows) or accounts without recovery options (Mac) require you to restart the computer and work from inside the system. Start by identifying which type of account you have — if you see an email address on the login screen, it is a Microsoft account; if you see only a username, it is likely a local account.
Key Takeaways
- Windows users with a Microsoft account can reset the password from the login screen using the email or phone number associated with the account.
- Mac users can reset using their Apple ID, or use a recovery key if they saved one when setting up the account.
- Windows local accounts and Mac accounts without recovery options require restarting in recovery mode and creating a new administrator account.
- The recovery process takes 10 to 30 minutes for remote resets and 30 to 60 minutes for recovery mode restarts.
- If you use a work or school laptop, contact your IT department first — they may have a faster reset process than the standard consumer route.
Windows: Resetting through a Microsoft account
On the Windows login screen, look for the text "I forgot my password" or a link that says "Reset password." Click it. Windows will ask you to enter the email address or phone number associated with your Microsoft account. You will receive a code by email or text message.
Enter that code on the screen, then create a new password. Make sure it is at least 8 characters long and includes uppercase letters, lowercase letters, numbers, and a symbol — this is what Microsoft requires. Once you enter the new password twice to confirm it, you can log in to your laptop. This process usually takes 5 to 10 minutes if you have internet access and can receive email or text messages.
If you do not see "I forgot my password" on the login screen, your account may be a local account rather than a Microsoft account. In that case, skip to the recovery mode section below.
Windows: Resetting a local account using recovery mode
A local account is one that exists only on your laptop, not tied to an email address. If you have a local account and no recovery email set up, you will need to restart your computer in recovery mode. Press the power button to turn off the laptop completely. Turn it back on and when ready hold down the F8 key (or Shift + F8 on some models) until you see a menu with options like "Safe Mode" and "Repair Your Computer."
Select "Repair Your Computer," then choose "Troubleshoot," then "Reset this PC." Windows will ask whether you want to keep your files or remove everything. Choose "Keep my files" — this will reset your password without deleting your documents, photos, or other data. The process takes 20 to 45 minutes and will restart your computer several times. When it finishes, you can log in with a new password you create during the reset.
If F8 does not work, try holding Shift while clicking the power button on the login screen, then select "Restart." This opens the same recovery menu on newer Windows versions.
Mac: Resetting with your Apple ID
On the Mac login screen, if you see an Apple ID listed, click "Forgot password?" below the password field. You will be asked to enter your Apple ID password (not your laptop password — these are different). If you remember your Apple ID password, enter it, and macOS will let you create a new laptop password right away.
If you do not remember your Apple ID password either, you can reset that through Apple's website on another device. Go to iforgot.apple.com, enter your Apple ID email address, and follow the steps to reset your Apple ID password. Once you have done that, return to your locked Mac and use the new Apple ID password to reset your laptop password.
This method works only if you set up your Mac with an Apple ID account. If you set up a local account instead, you will need to use recovery mode (see below).
Mac: Using recovery mode and creating a new administrator account
If you do not have an Apple ID set up on your Mac, or if you do not remember the email address associated with it, you will need to restart in recovery mode. Shut down your Mac completely. Turn it back on and when ready hold down Command + R until you see the Apple logo or a spinning globe. This opens Recovery Mode.
From the Utilities menu, select "Terminal." Type the command 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." Restart your Mac, and you can log in with the new password. This process takes 15 to 30 minutes.
If you want to avoid using Terminal, you can instead create a new administrator account in Recovery Mode. Go to Utilities, select "System Information," then look for "Users & Groups." Create a new administrator account with a password you choose. Once you restart and log in with that new account, you can delete the old account if you want to, though you do not have to.
What to do if you cannot access recovery mode
If you cannot get into recovery mode — for example, if your Mac has a firmware password set — you will need to contact Apple Support or visit an Apple Store. Bring a photo ID and proof of purchase if you have it. Apple can verify your identity and help you regain access, though this usually takes an appointment and may take several days.
For Windows, if F8 and Shift + Restart do not work, your laptop may have been set up by an organization (work or school) with restrictions. Contact your IT department. If it is a personal laptop and neither method works, you can take it to a computer repair shop, though they may charge a fee to help you regain access.
Preventing this from happening again
Once you are back in, set up a recovery method so you do not get locked out again. On Windows, go to Settings > Accounts > Security Options and add a recovery email address and phone number. On Mac, go to System Settings > General > Login Items and make sure your Apple ID is connected to your account.
Consider using a password manager like Bitwarden, 1Password, or KeePass to store your laptop password securely. A password manager can generate strong passwords and remember them for you, so you only need to remember one master password. Write that master password down and store it somewhere safe — a locked drawer, a safe, or with a trusted family member.
Frequently Asked Questions
Will I lose my files if I reset my password?
No. Whether you reset through a Microsoft account, Apple ID, or recovery mode, your files, photos, and documents stay on your laptop. The reset only changes your login password, not the data stored on the computer.
What if I do not remember the email address for my Microsoft account?
Look at the login screen — the email address should be displayed there. If you still cannot find it, try the phone number associated with the account instead. If you have neither, you will need to use Windows recovery mode to create a new local account.
Can I reset my password without restarting my computer?
Yes, if you have a Microsoft account (Windows) or Apple ID (Mac) and can access the password reset link from the login screen. This takes 5 to 10 minutes. If you have a local account with no recovery method, you must restart in recovery mode, which takes 30 to 60 minutes.
Do I need internet to reset my password?
You need internet for Microsoft account and Apple ID resets, because you have to receive a code by email or text. Recovery mode resets do not require internet — they work entirely on your laptop. If your internet is down, use recovery mode instead.
What if my laptop is encrypted and I forgot the encryption password too?
If your Windows drive is encrypted with BitLocker or your Mac uses FileVault, you will need the recovery key that was created when encryption was turned on. If you do not have that key, contact Microsoft Support (Windows) or Apple Support (Mac) with proof of ownership. Without the key, the drive cannot be unlocked.