The fastest way back in depends on what you remember

If you have forgotten your MacBook password, the path forward depends on whether you can answer your security questions, have access to a recovery key, or remember an Apple ID password tied to your account. Apple builds multiple routes back in because a single forgotten password should not lock you out of your own machine.

The method that works fastest for you is usually the one you set up before you got locked out. If you did not set anything up, you have a slower but still workable option: erasing the drive and reinstalling macOS. None of these routes require calling Apple or paying for service.

Key Takeaways

  • If you remember your Apple ID password, you can reset your login password from the login screen without erasing anything.
  • A recovery key (a 28-character code you may have saved when setting up two-factor authentication) lets you reset your password in under five minutes.
  • If you set up security questions during account creation, answering them correctly also resets your password without data loss.
  • If none of those work, you can erase your drive and reinstall macOS, then set a new password — this takes 30 minutes to an hour but wipes all files unless you have a backup.
  • The login screen itself shows you which reset method is available for your account; you do not have to guess.

Using your Apple ID to reset your password

At the MacBook login screen, click the question mark or "Forgot password?" link below the password field. The screen will ask for your Apple ID email address. Enter it, then click the arrow or Next button.

If your Mac is connected to the internet (Wi-Fi or ethernet), Apple will send a verification code to a trusted device — usually an iPhone, iPad, or another Mac you own. Open that device, find the code in a notification or in Settings > [Your Name] > Password & Security, and type it into your MacBook's login screen. Once verified, you can create a new password right there and log in when ready.

This method works only if you remember your Apple ID password and have access to a trusted device. If you do not have a trusted device nearby, you can wait up to 24 hours for Apple to send you a recovery link by email instead, but that is slower than the other routes.

Using a recovery key if you have one

A recovery key is a 28-character code that Apple generates when you turn on two-factor authentication. If you saved this code in a safe place — a password manager, a note in a drawer, a document on a USB drive — you can use it to reset your password without needing a trusted device.

At the login screen, click "Forgot password?" and select the option to use a recovery key instead of your Apple ID. Type or paste the code exactly as it appears. If the code is correct, you will be taken straight to a password reset screen. This is the fastest method if you have the code available.

If you cannot find your recovery key and do not remember setting one up, you likely did not enable two-factor authentication on your Apple ID. Move to the next method instead.

Answering security questions to reset your password

When you first created your Apple ID, you answered three security questions (such as "What is your mother's maiden name?" or "What was the name of your first pet?"). If you remember the answers you gave, you can use them to reset your password without needing a trusted device or recovery key.

At the login screen, click "Forgot password?" and select the option to answer security questions. You will be asked to provide your Apple ID email, then to answer two of the three questions you set up. Answer them exactly as you did when you created the account — capitalization and spelling matter.

If you answer both questions correctly, you will be taken to a password reset screen. If you get one wrong, the system will ask you to try again. After three failed attempts, you will be locked out of this method for a period of time and will need to use the Apple ID or recovery key method instead.

Erasing your drive and reinstalling macOS as a last resort

If you cannot use any of the three methods above, your last option is to erase your drive and reinstall macOS from scratch. This wipes all files, applications, and settings on your Mac, so use this only if you have a backup or if the data on the drive is not important to you.

Restart your Mac and hold Command + R as it starts up. Keep holding until you see the macOS Utilities window. Click Disk Utility, select your main drive (usually called "Macintosh HD"), click Erase, and confirm. Once the drive is empty, close Disk Utility and click "Reinstall macOS." Follow the on-screen steps to read and install a fresh copy of the operating system.

When the installation finishes, your Mac will restart and ask you to set up a new user account. Create a new password at that point. The whole process takes 30 minutes to an hour depending on your internet speed. After setup is complete, you can restore files from a Time Machine backup if you have one, or you will be starting fresh.

What to do if you do not have internet access

All of the password reset methods above require an internet connection to verify your identity with Apple's servers. If your Mac is not connected to Wi-Fi or ethernet, you will not be able to use the Apple ID, recovery key, or security question methods.

Connect to Wi-Fi or plug in an ethernet cable before you try any reset method. If you do not have internet access available, the erase-and-reinstall method is your only option, and it also requires internet because macOS must read the installer during setup.

Preventing this from happening again

Once you are back into your Mac, take a few minutes to set up the recovery methods you did not have in place. Open System Settings (or System Preferences on older Macs), click [Your Name] at the top, then Password & Security. Turn on two-factor authentication if it is not already on, and save your recovery key somewhere safe — a password manager like 1Password or Bitwarden, a physical notebook in a drawer, or a document on an external drive all work.

You can also enable Touch ID or Face ID on your Mac if your model supports it, which lets you log in with your fingerprint or face instead of typing a password. This does not replace a password recovery method, but it makes you less likely to forget your password in the first place because you use it less often.

Frequently Asked Questions

Can I reset my password if my Mac is not connected to the internet?

No. All password reset methods require an internet connection to verify your identity with Apple. Connect to Wi-Fi or ethernet before you try any method. If you cannot connect, erasing and reinstalling macOS is your only option, and that also requires internet during setup.

What if I do not remember my Apple ID password either?

Go to iforgot.apple.com on another device (phone, tablet, or computer) and reset your Apple ID password there. Once you have a new Apple ID password, you can use it to reset your MacBook login password. This takes a few extra minutes but works the same way.

Will resetting my password delete my files?

No, not if you use the Apple ID, recovery key, or security question methods. Your files stay on the drive and you keep your account. Only the erase-and-reinstall method deletes everything, and you choose that only if the other methods do not work.

How do I find my recovery key if I saved it somewhere?

Check your password manager (search for "recovery key"), look through saved documents or emails, check a physical notebook or drawer, or look on any USB drives you use for backups. If you cannot find it after a thorough search, use the Apple ID or security question method instead.

What if I get locked out of my Apple ID too?

Go to iforgot.apple.com and follow the steps to reset your Apple ID password. You will need access to a trusted device or a recovery email address. Once your Apple ID is working again, you can use it to reset your MacBook password.