The fastest way depends on what you remember

If you have forgotten your password, you can reset it without losing your files — but the method changes based on whether you use Windows or Mac, and whether you set up a recovery email or phone number when you first created the account. On Windows, you can use a password reset disk if you made one before you locked yourself out, or reset through your Microsoft account online. On Mac, you can use your Apple ID, a recovery key, or restart into Recovery Mode. The key difference: Windows lets you reset from outside the system, while Mac usually requires you to restart into a special mode first.

The process takes between 15 minutes and an hour depending on your setup and internet speed. You will not lose your documents, photos, or installed programs — a password reset only changes your login credentials, not the files stored on the computer.

Key Takeaways

  • Windows users can reset a password through their Microsoft account online if they remember the email address attached to it, or by using a password reset disk created before the lockout.
  • Mac users can reset a password using their Apple ID, a recovery key saved during setup, or by restarting into Recovery Mode and creating a new administrator account.
  • If you do not remember your Microsoft or Apple ID password either, you will need to recover that account first through the company's account recovery process.
  • Password reset does not erase your files — it only changes the login password, so all your documents and programs remain on the computer.
  • If none of these methods work, you may need to reinstall the operating system, which does erase everything on the drive.

Windows: Reset through your Microsoft account

If your Windows laptop is connected to a Microsoft account (not a local account), you can reset your password from any other computer or phone with internet access. Go to account.microsoft.com and click "Sign in". Enter the email address or phone number associated with your account. Click "Can't access your account?" and follow the prompts to verify your identity — Microsoft will ask you to enter a code sent to your recovery email or phone number, or answer security questions you set up when you created the account.

Once you have verified your identity, you can create a new password. Return to your locked laptop and enter the new password at the login screen. This method works only if you remember the email address or phone number tied to your Microsoft account and still have access to the recovery email or phone number you listed.

If you do not remember your Microsoft account email or phone number, or you cannot access the recovery email or phone, you will need to use Microsoft's account recovery process, which can take several days and requires you to prove ownership of the account through additional verification steps.

Windows: Use a password reset disk

If you created a password reset disk before you forgot your password, you can use it to reset your login without needing your Microsoft account. Insert the USB drive or floppy disk into your laptop. At the Windows login screen, click "Reset password" (this link appears below the password field on some versions of Windows). Follow the wizard and select the reset disk when prompted. The wizard will let you create a new password without entering the old one.

Password reset disks are only useful if you made one before the lockout. If you did not create one, this option is not available to you. If you have access to another Windows computer, you can create a reset disk now for future use, but it will not help with your current locked laptop.

Mac: Reset using your Apple ID

On a Mac, the simplest reset path is through your Apple ID. At the login screen, if you see a "Reset Password" option, click it and enter your Apple ID email and password. Your Mac will let you create a new login password. If you do not see this option, restart your Mac and hold Command + Q at the login screen to access additional options, then look for password reset.

If you do not remember your Apple ID password, you will need to recover that account first at iforgot.apple.com before you can reset your Mac login. This process can take 24 hours or more depending on Apple's verification steps.

Mac: Use Recovery Mode to create a new administrator account

If you cannot reset through your Apple ID, restart your Mac and when ready hold Command + R until you see the Apple logo. This boots your Mac into Recovery Mode. Click "Utilities" in the menu bar, then "Terminal". Type resetpassword and press Enter. A password reset window will open. Select your Mac's hard drive from the dropdown, then select your user account. Enter a new password twice and click "Save". Restart your Mac and log in with the new password.

If the resetpassword command does not work on your version of macOS, you can create a new administrator account instead. In Terminal, type dscl . -create /Users/newusername UserShell /bin/bash (replace "newusername" with a name you choose), then follow the prompts to set a password. Once you create this new account and restart, you can log in as the new administrator and access your files from the original account.

Mac: Use a recovery key

If you set up two-factor authentication on your Apple ID and saved a recovery key when you first enabled it, you can use that key to reset your Mac password. At the login screen, click the question mark icon or "Forgot password?" if it appears. Enter your Apple ID email. When prompted for verification, select "I don't have my trusted devices" and enter your recovery key. You will then be able to create a new password.

Recovery keys are long alphanumeric codes that Apple gives you only once, when you first turn on two-factor authentication. If you did not save yours, you cannot retrieve it — you will need to use one of the other reset methods instead.

What to do if you cannot remember your Microsoft or Apple ID password

If you have forgotten both your laptop password and the password to your Microsoft or Apple account, you will need to recover your account before you can reset your laptop. Go to account.microsoft.com (Windows) or iforgot.apple.com (Mac) and click "I forgot my password". You will be asked to verify your identity using a recovery email, phone number, or security questions. Microsoft usually responds within minutes; Apple can take 24 hours or longer.

Once you have regained access to your Microsoft or Apple account, follow the steps above to reset your laptop password. If you cannot verify your identity to either company — for example, because you no longer have access to the recovery email or phone number — you may need to contact their support team by phone or chat, which can add several days to the process.

When you need to reinstall the operating system

If none of the above methods work — for example, if you have a local Windows account with no recovery email, no reset disk, and no Microsoft account linked to it — your only remaining option is to reinstall Windows or macOS. This erases everything on the drive, including your files, programs, and settings. You will need a USB drive with at least 8 GB of space and access to another computer to create the installation media.

Before you reinstall, try contacting Microsoft Support (for Windows) or Apple Support (for Mac) to see whether they can help you recover access without erasing the drive. Some situations have workarounds that are not obvious. If support confirms that reinstallation is necessary, back up any files you can access from another user account on the same computer before you proceed.

Frequently Asked Questions

Will resetting my password erase my files?

No. Resetting your password only changes your login credentials. All your documents, photos, downloads, and installed programs stay on the computer. You will be able to see and use them once you log in with the new password.

Can I reset my password if I do not have internet access?

On Windows, you can use a password reset disk if you created one before the lockout. On Mac, you can use Recovery Mode to reset or create a new account without internet. If you have neither of these options, you will need internet access to verify your identity through your Microsoft or Apple account.

How long does a password reset take?

If you use a password reset disk or Recovery Mode, the reset takes 10 to 20 minutes. If you reset through your Microsoft or Apple account online, it takes 15 to 30 minutes. Account recovery (if you forgot your Microsoft or Apple password too) can take anywhere from a few minutes to several days depending on the verification method.

What if I see a message saying I cannot reset my password?

This usually means your account is not linked to a Microsoft or Apple ID, or your recovery email and phone are not accessible. Try the Recovery Mode method for Mac or the password reset disk method for Windows. If neither is available, contact Microsoft or Apple support — they can sometimes verify your identity through other means.

Can someone else reset my password without my permission?

On Windows, only someone with access to your recovery email or phone can reset your password through your Microsoft account. On Mac, only someone with your Apple ID password can reset through that method. If you are concerned about unauthorized access, change your Microsoft or Apple account password as soon as you regain access to your laptop.