The fastest way back in depends on what you remember

If you've forgotten your MacBook password, you have several paths forward. The speed and difficulty of each depends on whether you remember your Apple ID, whether you set up recovery options like a phone number or backup email, and which version of macOS you're running. The most common route — using your Apple ID to reset the password — takes about 10 minutes if you have access to the email or phone number tied to that account. If you don't remember your Apple ID or can't access its recovery methods, you'll need to use macOS Recovery Mode, which takes longer but doesn't require that information.

Each method has a different requirement and a different outcome. Some preserve your files completely. Others require you to have saved a backup beforehand. The path you take depends on what information you still have access to and how much time you're willing to spend.

Key Takeaways

  • If you remember your Apple ID and can access its recovery email or phone number, you can reset your password from the login screen in under 10 minutes.
  • If you don't remember your Apple ID, you'll need to restart into Recovery Mode and use the resetpassword utility, which takes 5 to 10 minutes and doesn't erase your files.
  • Two-factor authentication on your Apple ID makes password recovery slower because Apple requires you to verify your identity through a trusted device or phone number.
  • If you set up a recovery key when you enabled FileVault encryption, that key can bypass the password reset process entirely and works even if you don't remember your Apple ID.
  • Erasing your drive and reinstalling macOS is a last resort that deletes all data unless you have a Time Machine backup to restore from afterward.

Resetting your password using your Apple ID

At the login screen, click the question mark icon or wait for it to appear after several failed password attempts. This opens the password reset dialog. Enter your Apple ID email address — the one you use to sign into iCloud or the App Store. Click the arrow or press Enter.

macOS will send a verification code to the email address or phone number associated with your Apple ID. Check that email inbox (including spam) or look for a text message if you chose phone verification. Enter the code into the dialog box on your Mac. Once verified, you'll be prompted to create a new password. Type it twice to confirm, then press Enter. You should be able to log in when ready with the new password.

If you have two-factor authentication turned on for your Apple ID, the process is the same but slower: Apple will require you to verify your identity using a trusted device (another Mac, iPhone, or iPad signed into the same Apple ID) or by answering security questions you set up when you created the account. This can add 5 to 15 minutes depending on whether you have access to those devices or remember those answers.

Using Recovery Mode when you don't remember your Apple ID

Restart your Mac and when ready hold down Command + R as it boots. Keep holding until you see the Apple logo or a spinning globe. This launches Recovery Mode, which runs a minimal version of macOS separate from your main drive. From the Utilities menu at the top, select Terminal.

In the Terminal window, type resetpassword and press Enter. This opens the Reset Password utility. Select your Mac's hard drive from the list on the left (usually called "Macintosh HD" or similar), then select your user account from the dropdown. Create a new password, confirm it, and click Save. Restart your Mac normally and log in with the new password.

This method works on most Macs running macOS Big Sur or earlier. On newer Macs with Apple Silicon chips (M1, M2, M3), the resetpassword utility may not appear in Utilities. If that happens, you'll need to erase the drive and reinstall macOS, which erases all your data. Before you do that, check whether you have a Time Machine backup — if you do, you can restore your files after reinstalling.

Using your FileVault recovery key

If you enabled FileVault disk encryption on your Mac, you may have saved a recovery key — a long string of letters and numbers that Apple gave you when you turned on FileVault. If you saved this key somewhere safe (email, password manager, printed copy), you can use it to bypass the password reset entirely.

At the login screen, enter any username and any password. After three failed attempts, a message appears asking if you want to use your recovery key. Click "Can't sign in?" or wait for the recovery key prompt. Enter the recovery key exactly as it appears, with or without spaces — macOS accepts both formats. Once you enter the correct key, you'll be able to create a new password and log in when ready.

If you don't remember saving a recovery key, you likely didn't have FileVault turned on, or you didn't save the key when macOS offered it. You can check by going to System Settings > Privacy & Security > FileVault after you regain access — if it says FileVault is on, the recovery key exists somewhere in your records.

Erasing your drive and reinstalling macOS

If Recovery Mode's password reset doesn't work and you don't have a recovery key, your last option is to erase the drive and reinstall macOS. This erases all data on your Mac unless you have a Time Machine backup to restore from afterward. Only do this if you've exhausted the other methods and you have a backup or don't need the data on the drive.

Restart into Recovery Mode (Command + R during startup). From the Utilities menu, select Disk Utility. Select your Mac's hard drive from the list on the left, click Erase, choose a format (APFS for newer Macs, Mac OS Extended for older ones), and confirm. Once the erase completes, close Disk Utility and select "Reinstall macOS" from the Recovery menu. Follow the prompts to read and install a fresh copy of macOS. When installation finishes, you'll be prompted to create a new user account and password.

If you have a Time Machine backup, connect that drive after macOS reinstalls and completes setup. During the initial setup, you'll see an option to restore from a backup — select your Time Machine drive and let the restore finish. Your files, applications, and settings will return, but you'll have a new password you just created.

Preventing this from happening again

Write down your Apple ID email address and store it somewhere you won't lose it — a password manager, a printed list in a safe place, or a trusted person who knows where to find it. This single piece of information unlocks your Mac even if you forget the password.

Set up two recovery options on your Apple ID: a phone number and a backup email address. Go to Settings > [Your Name] > Password & Security on any Apple device, or visit appleid.apple.com on any computer. Add both a phone number and an email address that you'll have access to for the next several years. If you ever forget your password, you'll have two ways to verify your identity instead of one.

If you use FileVault encryption, save your recovery key in a password manager like 1Password, Bitwarden, or the built-in Keychain. Do not store it in a note on your Mac itself — if you can't log in, you can't access it. A password manager syncs across devices, so you can retrieve it from your phone or another computer if needed.

Frequently Asked Questions

Can I reset my password without erasing my files?

Yes, if you remember your Apple ID or have a FileVault recovery key. Both methods let you create a new password without touching your files. Only the erase-and-reinstall method deletes data, and that's a last resort when you can't use the other options.

What if I don't remember my Apple ID email address?

Try any email addresses you've used in the past — Apple IDs are often created with an old email you might not use anymore. If you have another Apple device (iPhone, iPad, older Mac), go to Settings and look under your name to see which email is signed in. That's your Apple ID. If you still can't find it, you'll need to use Recovery Mode and the resetpassword utility instead.

How long does it take to regain access?

Using your Apple ID takes 10 to 20 minutes if you have two-factor authentication off, or 20 to 45 minutes if it's on and you need to verify through a trusted device. Recovery Mode and resetpassword takes 5 to 10 minutes. Erasing and reinstalling macOS takes 30 minutes to an hour depending on your internet speed and which macOS version you're installing.

Will I lose my files if I use Recovery Mode?

No. The resetpassword utility in Recovery Mode changes your password without touching your files. Only the erase-and-reinstall method deletes data, and you should only do that if resetpassword doesn't work.

Can someone else reset my password if they have physical access to my Mac?

Yes, if FileVault is not turned on. Anyone with physical access can restart into Recovery Mode and use resetpassword. If you want to prevent this, turn on FileVault encryption in System Settings > Privacy & Security. With FileVault on, Recovery Mode can't reset the password without the recovery key or Apple ID verification.