The fastest way back into your Mac
If you remember your Apple ID email and password, you can reset your Mac login password in about five minutes without erasing anything. Go to the login screen, click the question mark icon below the password field, then click "Reset it" and follow the prompts to verify your identity through Apple ID. Your Mac will let you create a new password when ready and you'll be back at your desktop.
If you don't have access to your Apple ID, or if that method doesn't work, your next option depends on whether you set up a recovery key or another administrator account on the Mac. Each path takes a different amount of time and requires different information you may already have on hand.
Key Takeaways
- If you remember your Apple ID credentials, use the login screen's password reset option to regain access in minutes without losing files.
- A recovery key (a 28-character code Apple gave you when you turned on two-factor authentication) can reset your password if you saved it somewhere safe.
- If you have another administrator account on the Mac, you can use it to reset the forgotten password from System Settings.
- Resetting through Recovery Mode erases your entire drive, so it should only be your last option when no other method works.
- Apple ID verification requires either a trusted phone number or a trusted device that can receive a verification code.
Using your Apple ID at the login screen
This is the simplest method if you remember your Apple ID email and the password you use for that account. At the login screen, look for a small question mark icon directly below the password field. Click it and select "Reset it" from the menu that appears.
You'll be asked to enter your Apple ID email address. After you do, Apple will send a verification code to a phone number or email address associated with your account. Enter that code when prompted. Once verified, you can create a new Mac login password right away. You don't need to restart, reinstall anything, or lose any files — just log in with your new password.
This method works only if your Mac is connected to the internet and if you have access to the phone number or email address Apple uses to verify your identity. If you've lost access to both, you'll need to try a different approach.
Recovering with a recovery key
When you first set up two-factor authentication on your Apple ID, Apple gave you a 28-character recovery key that looks like XXXX-XXXX-XXXX-XXXX-XXXX-XXXX. If you saved this code somewhere — in a password manager, a document, or written down — you can use it to reset your password without needing a phone or email verification.
At the login screen, click the question mark below the password field and select "Reset it." Enter your Apple ID email, then when asked for verification, choose "Don't have access to your trusted devices?" and select "Use your recovery key." Paste or type the 28-character code. Apple will let you create a new password when ready.
The recovery key is one of the most reliable ways back in because it doesn't depend on your phone or email being accessible. The trade-off is that you have to have saved it somewhere you can still reach. If you never wrote it down or saved it, this method won't work.
Using another administrator account on the Mac
If someone else set up an administrator account on your Mac, or if you created one yourself and still remember its password, you can use that account to reset the forgotten password. Log in with the administrator account, then open System Settings and go to General > Users & Groups (or Users & Groups in older macOS versions).
Click the lock icon in the bottom left to unlock the settings, then select your account from the list. Click "Reset Password" and create a new one. You'll be able to log out and use your new password on your account when ready.
This method requires that you have physical access to the Mac and that you remember the password for the other administrator account. If you're the only person who ever used the Mac, or if all other accounts are also locked, you'll need to move to the next option.
Resetting through Recovery Mode
Recovery Mode lets you reset your password using your Apple ID, but it requires restarting your Mac and takes longer than the login screen method. Shut down your Mac completely. If you have an Apple silicon Mac (M1, M2, M3, or newer), hold the power button until "Loading startup options" appears on the screen. If you have an Intel Mac, hold Command and R while it starts up.
Once you see the Recovery Mode menu, click "Reset Password" in the Utilities menu at the top. Select your account, then enter your Apple ID email and password. Apple will send a verification code to your phone or email. After you enter it, you can create a new password. Restart your Mac when finished.
This method works even if the login screen password reset option isn't available, but it takes longer because your Mac has to restart. Use it if the login screen method fails or if you need to reset the password for a different account on the Mac.
Erasing and starting over (last resort)
If you can't remember your Apple ID password, don't have a recovery key, don't have another administrator account, and can't access a trusted phone number or email, your only remaining option is to erase the Mac and reinstall macOS. This deletes everything on the drive — all your files, programs, and settings — so do this only when no other method will work.
Start in Recovery Mode the same way as above. Instead of clicking "Reset Password," click "Reinstall macOS" and follow the prompts. The Mac will erase itself and read a fresh copy of the operating system. When it finishes, you'll go through the setup process as if the Mac were brand new, and you can create a new account with a password you choose.
After setup completes, you can sign in with your Apple ID to restore files from a Time Machine backup if you have one. If you don't have a backup, those files are gone. This is why it's worth spending time on the earlier methods first.
Preventing this from happening again
Once you're back in, take a few steps to make sure you don't get locked out again. Write down your recovery key (the 28-character code) and store it somewhere safe — a password manager, a safe deposit box, or a document you keep in a find location. Don't store it in a note on the Mac itself, because you won't be able to reach it if you're locked out.
Make sure your Apple ID recovery email and phone number are current. You can check these in System Settings > [Your Name] > Password & Security. If you've changed phone numbers or email addresses since you set up your account, update them now so Apple can reach you if you need to reset your password in the future.
If you share the Mac with other people, create a second administrator account for at least one other person. That way, if you forget your password, someone else can log in and help you reset it without needing to erase the drive.
Frequently Asked Questions
How long does it take to reset my password?
Using your Apple ID at the login screen takes about five minutes if you have access to a verification code. Recovery Mode takes 10 to 15 minutes because the Mac has to restart. Erasing and reinstalling macOS can take 30 minutes to an hour depending on your internet speed and Mac model.
Will I lose my files if I reset my password?
No, not if you use the Apple ID method or the recovery key method. Your files stay on the Mac. Only the erase-and-reinstall option deletes everything, and that should be your last resort.
What if I don't remember my Apple ID password either?
Go to iforgot.apple.com and enter your Apple ID email. Apple will send you a link to reset your Apple ID password. Once you've done that, you can use the login screen method to reset your Mac password. This works as long as you have access to the email address or phone number tied to your Apple ID.
Can I reset my password without the internet?
No. All password reset methods require an internet connection so your Mac can contact Apple to verify your identity. If your internet is down, fix that first, then try the login screen method.
What if the question mark icon doesn't appear below the password field?
This can happen on very old Macs or if your account was set up without an Apple ID. Try restarting the Mac and waiting 30 seconds at the login screen — the icon sometimes takes a moment to appear. If it still doesn't show, use Recovery Mode instead.