The fastest way depends on what you remember and what device you have

If you have forgotten your password, the path forward depends on whether you use Windows, Mac, or Linux, and whether you can still access the email or phone number tied to your account. Windows lets you reset through your Microsoft account if you remember that email. Mac requires your Apple ID or a recovery key. Linux varies by distribution, but usually requires booting into recovery mode. The method that works fastest is the one that matches what you actually have access to right now.

Before you start, gather what you have: the email address associated with your account, a phone number on file, or access to another device that is already signed in. If you have none of these, you will need to use your computer's built-in recovery tools, which take longer but do not require outside accounts. Start with the method that matches your situation, not the one that sounds easiest.

Key Takeaways

  • Windows users can reset a password through their Microsoft account email in about ten minutes if they remember that email address.
  • Mac users need either their Apple ID password or a recovery key that was created when they first set up the computer.
  • If you cannot access your email or phone number, you will need to use your computer's recovery mode, which takes longer but does not require outside accounts.
  • Write down your new password somewhere safe before you log in, because resetting a second time is harder than the first.

Windows: resetting through your Microsoft account

On the Windows login screen, select I forgot my password below the password field. Windows will ask you to enter your email address — this is the Microsoft account email, not necessarily the email you use for work or other services. If you are not sure which email is tied to your account, try the one you remember using when you first set up the computer.

Windows will send a code to that email address. Check your inbox and copy the code. If you do not see the email within two minutes, check your spam folder — Microsoft emails often land there. Enter the code on the screen, then create a new password. Make it at least eight characters long and include a number or symbol, because Windows will reject anything shorter or simpler.

Once you have entered the new password twice to confirm it matches, Windows will log you in. You are now back in your account. If you do not receive the email code at all, move to the recovery key method below.

Windows: using a recovery key if you cannot access your email

If you set up two-factor security on your Microsoft account, you may have saved a recovery key — a long string of numbers and letters that looks like this: 1234-5678-9012-3456-7890. This key was usually shown to you once when you first turned on two-factor security, and you may have written it down or saved it to a file.

On the login screen, select I forgot my password, then select I don't have access to these options at the bottom. Windows will ask for your recovery key. Paste or type the key exactly as it appears, including the dashes. Windows will then let you create a new password without needing your email.

If you do not have a recovery key and cannot access your email, you will need to use the local account reset method, which requires a second computer or a USB drive. This process is longer and is covered in the section below.

Mac: resetting with your Apple ID

On the Mac login screen, you will see a question mark icon or a reset option. Click it, then enter your Apple ID email and password. If you remember your Apple ID password, Mac will let you create a new computer password when ready. You do not need to restart or use recovery mode.

If you do not remember your Apple ID password, go to iforgot.apple.com on another device and reset that password first. Then return to your Mac and try again with the new Apple ID password. This usually takes five to ten minutes total.

If you do not have access to your Apple ID email or phone number, you will need your recovery key, which is a long code Apple gave you when you first set up your Mac. If you have that code, you can use it instead of your Apple ID password on the login screen.

Mac: using your recovery key

A recovery key is a code that looks like XXXX-XXXX-XXXX-XXXX and was shown to you when you first turned on two-factor security for your Apple ID. You may have written it down, saved it to a file, or stored it in a password manager.

On the Mac login screen, select the question mark icon, then enter your Apple ID email. When prompted for your password, select Can't access your account? and choose Use your recovery key. Enter the key exactly as it appears. Mac will then let you set a new password.

If you do not have your recovery key and cannot access your Apple ID, you will need to use macOS Recovery mode, which requires restarting your computer. This process is more involved and is covered below.

Using recovery mode when you have no other options

If you cannot access your email, phone number, or recovery key, you can still reset your password using your computer's built-in recovery tools. On Windows, this is called Password Reset Disk or Reset this PC. On Mac, it is macOS Recovery. Both require you to restart your computer and follow on-screen prompts.

For Windows, restart your computer and hold down the F8 key repeatedly as it boots up. You should see a menu with the option Repair Your Computer. Select it, then choose Troubleshoot, then Reset this PC. Windows will ask whether you want to keep your files or erase everything. Keeping your files is usually faster, but if you are not sure, choose erase everything — it is safer if you are concerned about security.

For Mac, restart and hold down Command + R as it boots. You will enter Recovery mode. Select Utilities from the menu, then Terminal. Type resetpassword and press Enter. A window will open where you can select your account and create a new password. This method works on most Macs made after 2010.

What to do after you have reset your password

Once you are back in your account, change your password again from within your settings. Go to Settings (Windows) or System Preferences (Mac), find Accounts or Users & Groups, and select your account. Look for Change Password or Edit Password. This second password should be different from the one you just created, and you should write it down somewhere safe — a notebook, a password manager, or a trusted person.

If you use a password manager like Bitwarden, 1Password, or LastPass, add your new computer password to it now. If you do not use a password manager, consider setting one up. A password manager stores passwords securely and can help you reset them if you forget again.

Finally, check whether you have a recovery key or backup codes saved anywhere. If not, create them now while you are in your account. Both Windows and Mac let you generate these from your account settings, and having them saved means the next reset will be much faster.

Frequently Asked Questions

Can I reset my password without restarting my computer?

Yes, if you remember the email or phone number tied to your account. Windows and Mac both let you reset through your online account without restarting. You only need to restart if you cannot access that email or phone number and have no recovery key.

What if I forgot both my password and my recovery key?

You can still reset using recovery mode, but you will lose access to any files that were encrypted with your old password. For Windows, use Reset this PC and choose to erase everything. For Mac, use Recovery mode and Terminal. Both will let you create a new account or reset the existing one, but encrypted files may be unrecoverable.

How long does a password reset usually take?

If you have your email or recovery key, between five and fifteen minutes. If you need to use recovery mode, plan for thirty minutes to an hour, because you will need to restart and follow several steps. The email code method is usually fastest.

Will resetting my password delete my files?

Not if you use the email or recovery key method — those reset only your password and leave all your files untouched. Recovery mode can erase files if you choose that option, but you can usually select "keep my files" instead. Read the on-screen options carefully before confirming.

What if my computer is not connected to the internet?

You cannot use the email code method without internet. Connect to Wi-Fi or plug in an ethernet cable before you start. If you cannot connect, you will need to use recovery mode, which does not require internet but takes longer.