The fastest way back in depends on what you remember
If you have forgotten your password, the path forward depends on whether you set up a recovery method when you created the account. Windows and Mac both offer built-in routes to reset your password without losing your files — but they only work if you prepared ahead. If you did not, the process takes longer and may require you to prove ownership of the device or account.
The key difference: a password reset (which you can do yourself through recovery options) is not the same as a factory reset (which erases everything). Most people can avoid the factory reset by using the recovery tools their operating system provides.
Key Takeaways
- Windows and Mac both let you reset a forgotten password if you set up a recovery email or phone number when you created the account.
- If you cannot remember any recovery information, you will need to prove you own the device or account, which usually means contacting Microsoft or Apple support.
- A password reset keeps your files intact; a factory reset erases everything on the computer.
- The process takes minutes if you have recovery information set up, or days to weeks if you need to verify ownership through support.
Resetting a Windows password using a recovery email or phone
On the Windows login screen, look for the text "I forgot my password" below the password field. Click it. Windows will ask you to enter a security code sent to the recovery email or phone number you provided when you set up the account.
Check the email inbox (or text messages) for a code from Microsoft. Enter that code on the Windows screen. You will then be able to create a new password and log in. Your files, programs, and settings remain unchanged.
If you no longer have access to the recovery email or phone number — for example, you changed phone carriers or closed that email account — you cannot use this method. Move to the section below on contacting support.
Resetting a Mac password using your Apple ID
On the Mac login screen, if you have forgotten your password, you can use your Apple ID to reset it. Click the question mark icon next to the password field, or wait for the login screen to offer the option. Enter your Apple ID and password.
Mac will send a verification code to a trusted device (like your iPhone) or to a recovery email address associated with your Apple ID. Enter that code, and you will be able to set a new computer password. Your files and programs stay in place.
If you do not remember your Apple ID password either, or if you no longer have access to the phone or email tied to that ID, you will need to reset your Apple ID through Apple's website before you can reset your computer password. This adds extra steps but is still faster than a factory reset.
What to do if you have no recovery information
If you did not set up a recovery email, phone number, or Apple ID link when you created the account, Windows and Mac cannot send you a reset code. At this point, you have two options: contact the manufacturer's support team to verify you own the device, or perform a factory reset.
Contacting support means proving ownership — usually by providing the device serial number (found on the back or bottom of the computer), your name, and the email address you used to purchase it. Microsoft and Apple can then help you regain access. This process typically takes several days because support needs to verify your information.
A factory reset erases all files, programs, and settings on the computer and returns it to the state it was in when it left the factory. You will lose everything that is not backed up elsewhere. Only choose this route if you have no other option and you have already backed up your important files to an external drive or cloud storage.
Using a Windows installation disk or USB drive
If you have a Windows installation disk or USB drive (created on another computer), you can use it to reset your password without contacting support. Insert the disk or USB, restart the computer, and boot from it. This requires knowing how to access your computer's boot menu, which varies by manufacturer — usually you press F12, F2, Esc, or Del during startup.
Once you boot from the installation media, you will see an option to repair your computer or access recovery tools. From there, you can open a command prompt and use commands to reset the password. This method works only if you have physical access to the installation media and know how to navigate the boot process.
If you do not have installation media, you can create one on another Windows computer by downloading the Windows installation tool from Microsoft's website and following their instructions to write it to a USB drive.
Using a Mac recovery partition
Mac computers have a built-in recovery partition that you can access without logging in. Restart your Mac and hold Command + R during startup. This opens Recovery Mode, where you can access Disk Utility, reinstall macOS, or reset your password through the Utilities menu.
In Recovery Mode, click Utilities at the top, then select "Reset Password." You will be asked to select your user account and then create a new password. This method works without needing a recovery email or Apple ID, making it useful if you have no other recovery information set up.
After resetting your password in Recovery Mode, restart the Mac normally and log in with your new password. Your files and programs will be intact.
When a factory reset is your only option
If you cannot use any of the methods above — no recovery email, no phone number, no installation media, no access to Recovery Mode — a factory reset is the remaining option. On Windows, you can reset the computer from the login screen by clicking "Reset this PC" (available on some versions). On Mac, you can use Recovery Mode to erase the drive and reinstall macOS.
Before you proceed, understand that a factory reset deletes everything: your files, photos, documents, programs, and settings. If any of those files are important, back them up to an external drive or cloud storage first if you can. If you cannot access the computer at all, the files are lost.
After the factory reset completes, the computer will restart and ask you to set up a new account, just as if it were brand new. You can then create a new password and log in. Take time to set up a recovery email or phone number during setup so you do not face this situation again.
Frequently Asked Questions
Can I reset my password without losing my files?
Yes, if you use the password reset methods described above (recovery email, phone, Apple ID, or Recovery Mode). These methods change only your password and leave all files intact. A factory reset is different — it erases everything. Only use a factory reset if no other method works.
What if I forgot both my password and my recovery email password?
You will need to reset your recovery email password first through that email provider's website, then use it to reset your computer password. If you cannot access the recovery email account either, contact Microsoft or Apple support with proof of device ownership to verify your identity and regain access.
How long does it take to reset a password through support?
If you contact Microsoft or Apple support, the process typically takes several days because they need to verify you own the device or account. Password reset through recovery email or phone is when ready — usually within minutes. A factory reset takes 30 minutes to a few hours depending on the computer.
Will resetting my password affect my programs or internet connection?
No. A password reset changes only your login password. Your programs, internet settings, files, and everything else on the computer stays the same. You will log in with your new password and everything will work as before.
Can I prevent this from happening again?
Yes. Set up a recovery email and phone number on your Windows account, or link your Mac to your Apple ID. Write down these recovery details and store them somewhere safe. If you ever forget your password again, you will be able to reset it in minutes instead of days.