The fastest way depends on what locked your computer
If you forgot your password, the path forward depends on whether you use Windows, Mac, or Linux, and whether you set up a recovery method when you created the account. If your computer locked itself because of inactivity or a screensaver, you just need to enter your password. If someone else locked it or you cannot remember anything about your account, the process is longer and may require proof of ownership.
The good news: you do not need to erase everything or pay for recovery software in most cases. Windows and Mac both have built-in ways to regain access. The bad news: they require either a recovery email address you set up beforehand, a phone number linked to your account, or physical access to another device you own.
Key Takeaways
- If your computer locked due to inactivity, straightforward enter your password at the login screen to unlock it when ready.
- On Windows, use the "Reset your password" link on the login screen if you have access to a recovery email or phone number you registered.
- On Mac, use your Apple ID or a recovery key to reset your password from the login screen without erasing your files.
- If you cannot remember your password and have no recovery method set up, you will need to verify ownership through your device's manufacturer before regaining access.
- Setting up a recovery email and backup phone number now prevents lockouts later.
Unlocking after inactivity or a screensaver
When your computer locks itself after sitting idle, the screen goes dark or shows a screensaver, and you see a login prompt. This is a security feature, not a permanent lock. Move your mouse, press any key, or click the screen to wake it, then enter your password as you normally would.
If you do not remember your password, do not try to guess it repeatedly — after several wrong attempts, Windows and Mac will temporarily lock you out or slow down login attempts. Instead, move to the password reset section below.
Resetting your password on Windows
On the Windows login screen, look for the text "I forgot my password" or "Reset password" below the password field. Click it. Windows will ask you to verify your identity using one of three methods: the email address you registered with your account, a phone number linked to your account, or security questions you answered when you set up the account.
If you chose email recovery, Windows will send a code to that email address. Check your inbox (and spam folder), copy the code, and paste it into the Windows login screen. Windows will then let you create a new password. If you chose phone recovery, you will receive a text message or phone call with a code instead.
If you set up security questions and remember the answers, you can answer them directly on the login screen without needing email or phone access. Once you answer correctly, you can set a new password when ready.
If none of these recovery methods work — you no longer have access to the email address, the phone number, or you cannot remember the security answers — you will need to contact Microsoft support and verify ownership of the device. Have your product key or device serial number ready.
Resetting your password on Mac
On the Mac login screen, if you cannot remember your password, click the question mark icon next to the password field, or wait a few seconds and a "Reset Password" button will appear. Click it. Mac will ask you to enter your Apple ID and password.
If you have an Apple ID linked to your Mac account, entering that ID and password will let you create a new login password without erasing any files. Your documents, photos, and applications stay exactly where they are.
If you do not remember your Apple ID password, you can reset that through Apple's website on another device. Go to iforgot.apple.com, enter your Apple ID email address, and follow the prompts to reset it using a recovery email or phone number. Once you have reset your Apple ID password, return to your Mac and use the new password to unlock it.
If you do not have an Apple ID or cannot access one, Mac offers a second option: use a recovery key. If you set up two-factor authentication on your Apple account, you should have a recovery key saved somewhere safe. Enter that key on the login screen instead of your password, and you can create a new password.
What to do if you have no recovery method set up
If you cannot use email, phone, security questions, or an Apple ID to reset your password, the manufacturer will require you to prove you own the device. This process is different for Windows and Mac.
For Windows, contact Microsoft Support through their website and explain that you are locked out of your own device. They will ask for proof of ownership — usually the product key printed on your device or in your purchase receipt, or the device serial number. Once verified, they can help you regain access. This process can take several days.
For Mac, contact Apple Support and provide proof of ownership such as your serial number, proof of purchase, or the device's original receipt. Apple can verify your identity and help you reset your password. Like Windows, this may take time, so be prepared to wait.
Preventing lockouts in the future
Add a recovery email address and phone number to your account right now, before you need them. On Windows, go to Settings > Accounts > Your info and add both a recovery email and phone number. On Mac, go to System Settings > General > Login Items & Extensions, then click your Apple ID and add a recovery email and phone number to your Apple account.
Write down your recovery email and phone number and store them somewhere safe — a notebook, a password manager, or a trusted family member. If you ever get locked out, you will have a way back in within minutes instead of days.
Consider using a password manager like Bitwarden, 1Password, or KeePass to store your passwords securely. These tools can also help you create strong, unique passwords for each account, which reduces the chance you will forget them.
Frequently Asked Questions
Can I unlock my computer without the password?
Not without proving you own it. Windows and Mac require either a recovery method (email, phone, or security questions) or verification of ownership through the manufacturer. If someone else locked your computer intentionally, you will need to contact the device owner or the manufacturer.
What if I forgot my Apple ID password too?
Go to iforgot.apple.com on another device and reset your Apple ID password using your recovery email or phone number. Once reset, use the new password to unlock your Mac. If you cannot access your recovery email or phone, Apple Support can verify your identity and help you regain access to your Apple ID.
Will resetting my password erase my files?
No. Resetting your password through the official Windows or Mac recovery methods keeps all your files, photos, and applications intact. Only a full factory reset erases everything, and that is a separate process you would choose deliberately.
How long does it take to regain access if I have no recovery method?
If you have email or phone recovery set up, you can reset your password in minutes. If you have no recovery method and need to contact the manufacturer, the process typically takes two to five business days, depending on how quickly you can provide proof of ownership.
Can I unlock someone else's computer?
No, and you should not try. If it is a family member's device, ask them for the password or recovery method. If it is a work computer, contact your IT department. Attempting to unlock a device you do not own is illegal in most places.