The fastest way depends on what you remember and what kind of laptop you have
If you can still log in to your email or phone number, you can reset your password in minutes without losing any files. If you cannot access either one, the process takes longer and varies sharply between Windows and Mac — Windows offers a built-in recovery path, while Mac requires either your Apple ID or a recovery key you may have saved years ago. The worst case is when you have none of these: a Windows laptop with a local account (not a Microsoft account) and no recovery email. That path exists but requires either a second computer or a USB drive you prepare in advance.
Start by identifying what you have: Do you remember the email address or phone number linked to your account? Can you access that email or phone right now? What operating system is the laptop — Windows or Mac? The answer to these three questions determines which section below applies to you.
Key Takeaways
- If your laptop uses a Microsoft account (Windows) or Apple ID (Mac), you can reset your password through email or phone recovery without touching the laptop itself.
- Windows laptops with local accounts have a built-in password reset screen that appears after several wrong attempts, but it requires you to answer security questions you set up before.
- Mac laptops require either your Apple ID password or a recovery key saved during setup; without both, you need to erase the drive and reinstall the operating system.
- If you have a second computer or USB drive, you can create a password reset disk on Windows or use Mac Recovery Mode to regain access.
- Resetting your password does not erase your files — they stay on the laptop, and you access them once you log in with the new password.
Windows: Using your Microsoft account email or phone
If your Windows laptop is signed in with a Microsoft account (you see your email address or a Microsoft login screen), go to account.microsoft.com on any other device — phone, tablet, or another computer. Click "Sign in" and then "Can't access your account?" below the password field. Microsoft will ask you to verify your identity by sending a code to your email or phone number. Enter that code, and you can set a new password when ready.
Once you have set the new password, go back to your laptop and sign in with it. Your files remain untouched. This works even if you have not used the laptop in months — Microsoft keeps your account active as long as you have signed in at least once in the past year.
If you do not remember which email or phone number you used, look for a backup email or phone number on the account recovery page. Microsoft often lets you recover using a secondary contact method if your primary one is no longer accessible.
Mac: Using your Apple ID
If you have an Apple ID (the account you use for the App Store, iCloud, or iTunes), you can reset your Mac password without erasing anything. Restart your Mac and hold down the power button until "Loading startup options" appears. Click "Options," then "Continue." You will see a login screen with a "Reset Password" button. Click it, select your user account, and choose "Reset using your Apple ID." Enter your Apple ID password, and you can create a new Mac password right there.
If you do not remember your Apple ID password, you can reset that too at iforgot.apple.com before you start. Have your recovery email or phone number ready — Apple will send you a verification code. Once you have reset your Apple ID password, go back to the Mac and use the same process above.
If you do not have an Apple ID or cannot access it, and you saved a recovery key when you first set up your Mac, you can use that instead. The recovery key is a 28-character code that Apple generates during setup. If you have it, select "Reset using Recovery Key" on the password reset screen and enter it.
Windows: Local account with security questions
If your Windows laptop uses a local account (you see a username but no email address at login), Windows shows a password reset screen after you enter the wrong password several times. The screen will ask you to answer the security questions you set up when you created the account — usually something like "What is your mother's maiden name?" or "What was the name of your first pet?"
Answer the questions correctly, and Windows lets you create a new password. Your files stay on the laptop. If you do not remember the answers to your security questions, this path is blocked, and you will need to use the USB recovery method described below.
Windows: Creating a password reset disk on a second computer
If you have access to another Windows computer and a USB drive, you can create a password reset disk that works on your locked laptop. On the second computer, read the free tool Offline NT Password Editor from the official website (search for it by name). Follow the instructions to create a bootable USB drive. Plug that USB drive into your locked laptop, restart it, and boot from the USB drive (usually by holding F12 or Del during startup — the key varies by laptop model).
The tool will show you a list of user accounts on your laptop. Select your account, and the tool will let you reset your password or remove it entirely. Once you restart your laptop normally, you can log in with the new password or no password at all. This method works on any Windows laptop, but it requires a second computer to set up the USB drive.
If you do not have a second computer available, you can ask a friend or family member to create the USB drive for you, then use it on your laptop.
Mac: Using Recovery Mode if you have no Apple ID
If you do not have an Apple ID, did not save a recovery key, and cannot reset your Apple ID password, your only option is to erase your Mac and reinstall the operating system. Restart your Mac and hold Command + R until the Apple logo appears. This opens Recovery Mode. Click "Utilities" in the menu bar, then "Terminal." Type resetpassword and press Enter. A password reset window will open — select your user account and create a new password.
If that does not work, you will need to erase the drive and reinstall macOS. In Recovery Mode, click "Erase Mac" and follow the prompts. This removes all files on the laptop. After the erase completes, you can reinstall macOS and set up a new account. You will lose any files that were not backed up to iCloud or an external drive.
Before you erase, check whether you have a Time Machine backup or iCloud backup. If you do, you can restore your files after you reinstall the operating system.
What happens to your files after you reset your password
Resetting your password does not delete, encrypt, or move any of your files. Everything on your laptop stays exactly where it is. Once you log in with your new password, you see the same desktop, folders, and programs you had before. The only thing that changes is the password you use to unlock the laptop.
If you used a method that required erasing the drive — like Mac Recovery Mode when you had no Apple ID — then yes, your files are gone unless you have a backup. But the standard password reset methods (Microsoft account, Apple ID, security questions, or Windows USB recovery) all preserve your files completely.
Frequently Asked Questions
Will resetting my password delete my files?
No. Resetting your password only changes how you log in. All your documents, photos, programs, and settings remain on the laptop. You access them normally once you log in with your new password. The only exception is if you erase the drive during the reset process, which only happens on Mac when you have no Apple ID and no recovery key.
What if I do not remember my security questions on Windows?
If you cannot answer your security questions and do not have a Microsoft account, you will need to create a password reset disk using a second computer and a USB drive. The Offline NT Password Editor tool (described above) bypasses the security questions entirely and lets you reset your password on any Windows laptop.
Can I reset my password if my laptop is not connected to the internet?
For Microsoft accounts and Apple IDs, you need internet access to verify your identity and reset your password. However, once you have reset your password on another device, you can log into your laptop offline with the new password. Windows local accounts with security questions work entirely offline — you answer the questions and reset your password right at the login screen.
How do I know if I have a Microsoft account or a local account on Windows?
Look at your Windows login screen. If you see an email address, it is a Microsoft account. If you see only a username (like "John" or "Admin"), it is a local account. You can also check by going to Settings > Accounts > Your Info on a computer you can already log into — it will say "Local account" or show your Microsoft email address.
What if I have a recovery key for my Mac but cannot find it?
Recovery keys are usually saved in your Apple ID account settings or emailed to you during setup. Go to iforgot.apple.com and sign in with your Apple ID to see if it is stored there. If you cannot find it and do not have your Apple ID password, you will need to erase your Mac and reinstall the operating system.