The fastest way depends on what you locked yourself out of

If you cannot remember your password, the path forward depends on whether you forgot your Windows password, your Mac password, or the password to a specific user account. Windows and Mac both have built-in recovery routes that work without calling support or erasing your drive. The method you use also depends on whether you set up a recovery email, a phone number, or security questions when you created the account.

Start by identifying which operating system you are using — look at the login screen itself. If you see a Windows logo or the word "Windows" anywhere on the screen, follow the Windows steps below. If you see an Apple logo, follow the Mac steps. If you are locked out of a work computer, your employer's IT department may have different rules, so check with them first before trying these methods.

Key Takeaways

  • Windows computers offer a "Reset your password" link on the login screen that sends a code to your recovery email or phone number.
  • Mac computers require you to use another admin account, your Apple ID, or Apple's online recovery process to regain access.
  • If you set up a recovery email or phone number when you created your account, you can use it to reset your password without erasing anything.
  • Chromebooks and Linux machines have different unlock methods — contact your organization if you use either of these systems at work.
  • If you cannot remember any recovery information, you may need to erase the drive and reinstall the operating system, which removes all files.

Unlocking a Windows computer with your recovery email or phone

On the Windows login screen, look for the text "I forgot my password" or "Reset password" — this link appears below the password field. Click it. Windows will ask you to enter a code that it sends to the email address or phone number you registered when you set up the account.

Check your email inbox or text messages for a six-digit code. Enter that code into the Windows reset screen. You will then be asked to create a new password. Type a password you will remember, at least eight characters long, and include a mix of uppercase letters, numbers, and symbols if possible. Windows will unlock and you can log in with your new password.

If you do not see a "Reset password" link on the login screen, your account may be a local account rather than a Microsoft account. Local accounts do not have a built-in recovery email, so you will need to use a different method — see the section below on using another admin account.

Unlocking a Windows computer using another admin account

If another person uses the same computer and has an admin account, they can reset your password without erasing your files. Ask them to log in with their account. Once they are logged in, they should right-click on the Start button, select "Computer Management," then navigate to "Local Users and Groups" and then "Users." They will see your account name in the list.

They should right-click your account name and select "Set Password." A dialog will appear asking them to confirm — they should click "Proceed." They can then set a temporary password for you. You can log in with that temporary password and change it to something you prefer by pressing Ctrl+Alt+Delete, selecting "Change a password," and entering your old and new passwords.

This method only works if the other person has admin rights on the computer. If no one else on the computer has an admin account, you will need to use the recovery email method or contact Microsoft support.

Unlocking a Mac with your Apple ID

On the Mac login screen, if you have forgotten your password, click the question mark icon or wait for the login screen to show a hint. After a few incorrect password attempts, the Mac will offer you the option to reset your password using your Apple ID. Click "Reset it using your Apple ID" or similar text on the screen.

Enter your Apple ID email address and password. The Mac will verify your identity and ask you to create a new password. Once you enter and confirm your new password, the Mac will unlock. You can then log in with your new password.

If you do not remember your Apple ID password either, you will need to visit iforgot.apple.com on another device and reset your Apple ID password first. Then return to your Mac and use the new Apple ID password to unlock it.

Unlocking a Mac using another admin account

If another person uses the same Mac and has an admin account, they can reset your password. Ask them to log in with their account. They should then open System Settings (or System Preferences on older Macs), navigate to "General" and then "Users & Groups" or "Accounts," and look for your account in the list on the left side.

They should click the lock icon at the bottom left of the window, enter their own password to unlock it, then select your account and click "Reset Password." They can set a temporary password for you. You can then log in and change it to a password you prefer by opening System Settings, going to "General" and then "Users & Groups," clicking the lock icon, selecting your account, and clicking "Change Password."

What to do if you have no recovery information and no other admin account

If you cannot use a recovery email, phone number, Apple ID, or another admin account, your only option is to erase the drive and reinstall the operating system. This removes all files on the computer, so it should be your last resort. Before you do this, consider whether the computer is a work device — contact your IT department first, because they may have a way to unlock it without erasing.

For Windows, you can use another computer to create a password reset disk on a USB drive, or you can use Microsoft's online account recovery tool at account.microsoft.com. For Mac, you can use another Mac to create a bootable recovery drive, or you can use Apple's online account recovery at iforgot.apple.com. Both processes require you to verify your identity with recovery information you set up earlier.

If you have no recovery information at all, you will need to erase the drive. This is a technical process that varies by operating system and computer model. Search for "[your computer model] factory reset" or "[your operating system] clean install" to find detailed instructions for your specific device.

Unlocking a Chromebook or work computer

Chromebooks use your Google account to log in, so if you forget your password, visit accounts.google.com on another device and reset your Google password. Then use your new password to log in to the Chromebook.

If you use a computer provided by your employer, school, or organization, do not try these methods — contact your IT department or help desk instead. Work computers often have security policies that prevent password resets without IT approval, and attempting to unlock them yourself may trigger security alerts or lock the account further.

Common mistakes that make unlocking harder

The most common mistake is trying the wrong password too many times. After several incorrect attempts, Windows and Mac will lock the account temporarily or ask for additional verification. Stop trying and use the recovery methods above instead.

Another mistake is not setting up recovery information when you first create your account. If you are setting up a new computer now, add a recovery email address and phone number to your account when ready — this takes two minutes and saves hours of trouble later.

A third mistake is assuming you can use someone else's account to reset yours without admin rights. Only accounts marked as "Administrator" or "Admin" can reset other accounts. If the other person's account is a standard user account, they cannot help you unlock yours.

Frequently Asked Questions

Can I unlock my computer without erasing it if I have no recovery email or phone?

Yes, if another person on the computer has an admin account. They can reset your password through the user management settings without erasing anything. If no one else has an admin account, you will need to erase the drive and reinstall the operating system.

How long does it take to reset a password using a recovery email?

The reset code arrives within a few minutes. The entire process — receiving the code, entering it, and creating a new password — usually takes less than five minutes. If you do not receive the code, check your spam folder or wait a few minutes and request a new code.

What if I remember part of my password but not all of it?

Do not guess. After three to five incorrect attempts, the system will lock you out temporarily or ask for additional verification. Use the recovery email or phone method instead of trying to guess the rest.

Can I unlock my work computer using these methods?

No. Work computers have different security rules set by your IT department. Contact your help desk or IT support instead — they have tools to unlock your account while keeping your files safe and maintaining security policies.

What should I do to prevent this from happening again?

Write your password in a find location like a password manager (Bitwarden, 1Password, or Dashlane are common options), add a recovery email and phone number to your account, and consider using a passphrase — a sentence or series of words — instead of a single word, which is easier to remember and harder to guess.