What to do when you forget your iPhone passcode

If you've forgotten your iPhone passcode, you have three main paths: use a computer to restore the phone through iTunes or Finder, use iCloud's Find My iPhone feature, or take the phone to an Apple Store. The fastest option depends on whether you remember your Apple ID password and whether you have access to a computer.

Apple does not have a master password or backdoor to unlock iPhones — the passcode is encrypted on the device itself. This means you cannot straightforward call Apple Support and have them unlock it remotely. You must either erase the phone and set it up fresh, or prove ownership through your Apple ID.

Key Takeaways

  • If you know your Apple ID password, use Find My iPhone on iCloud.com to erase the phone remotely and set it up again without visiting a store.
  • If you have a Mac or Windows computer, connect your iPhone and use Finder (Mac) or iTunes (Windows) to restore it, which also erases the passcode.
  • After erasing through any method, you will set up the phone as new or restore from a backup, and you'll need your Apple ID password to reactivate it.
  • If you don't remember your Apple ID password either, you can reset it through Apple's account recovery process, which takes a few days.
  • An Apple Store can help if you have your original receipt or other proof of purchase, but the process is the same — the phone gets erased.

Using Find My iPhone on iCloud.com

This is the fastest method if you remember your Apple ID password. Go to iCloud.com on any web browser, sign in with your Apple ID and password, and click Find My iPhone. Select your iPhone from the device list, then choose Erase iPhone. This sends a command to your phone to erase all data and passcode.

After the erase completes, your iPhone will show the setup screen. You can set it up as a new phone or restore from a backup if you have one saved to iCloud. Either way, you will need to enter your Apple ID password during setup — Apple requires this to reactivate the phone.

This method works even if your phone is powered off, as long as Find My iPhone was turned on before you forgot the passcode. If Find My iPhone was never enabled, this option won't work and you'll need to use a computer instead.

Restoring through a Mac or Windows computer

If you have access to a computer, connect your iPhone with a USB cable. On a Mac running macOS Monterey or newer, open Finder and click your iPhone in the sidebar. On a Windows PC or older Mac, open iTunes instead. In either program, click Restore, which will erase the phone and install the latest iOS version.

During the restore process, you won't be asked for your passcode — the computer bypasses it. Once the restore finishes, your iPhone will restart and show the setup screen. At that point, you'll need your Apple ID password to complete setup and reactivate the phone.

This method requires a computer you can trust — the phone will sync with that computer's iTunes or iCloud account during setup. If you're using someone else's computer, be aware that their Apple ID may appear during the process, and you should sign out afterward.

Resetting your Apple ID password if you've forgotten that too

If you don't remember your Apple ID password, you can reset it through Apple's account recovery page at iforgot.apple.com. Enter your Apple ID email address, then choose to verify your identity using a trusted phone number, a recovery key, or security questions you set up earlier.

The fastest verification method is usually a trusted phone number — Apple will text or call you a code to confirm you own the account. Once verified, you can create a new password when ready. If you don't have access to a trusted phone number, the security questions route is usually faster than a recovery key, which can take several days to process.

After you've reset your Apple ID password, you can use Find My iPhone or a computer to erase your iPhone and set it up again with your new password.

What happens at an Apple Store

If you don't have a computer and can't access iCloud.com, or if you want in-person help, visit an Apple Store with your iPhone. Bring a photo ID and, if you have it, your original receipt or proof of purchase. The Apple Store staff will verify your identity and ownership, then erase the phone using their tools.

The process at the store is the same as doing it yourself — your phone will be erased and you'll set it up fresh with your Apple ID. This usually takes 15 to 30 minutes. You do not need to know your passcode to do this, but you will need to prove you own the phone.

If you don't have proof of purchase, the store may ask additional security questions or may not be able to help. In that case, you can still use Find My iPhone or a computer at home if you have access to either.

Setting up your iPhone after the erase

Once your iPhone is erased through any method, it will restart and show the Hello screen. Follow the setup steps: choose your language and region, connect to Wi-Fi, and sign in with your Apple ID. You must enter your Apple ID password during this step — there is no way to skip it.

After you sign in, you can choose to restore from an iCloud backup if you have one. This will bring back your apps, photos, messages, and other data. If you don't have a backup, you'll set up as a new phone and can read your apps again from the App Store.

Once setup is complete, you'll be asked to create a new passcode. This is your chance to choose something you'll remember — write it down somewhere safe, or use a password manager to store it.

Preventing this from happening again

The best protection against a forgotten passcode is to use a password manager like 1Password, Bitwarden, or Apple's built-in Keychain to store it. These tools can generate a strong passcode and remember it for you, so you don't have to.

You should also make sure Find My iPhone is turned on. Go to Settings, tap your name at the top, select Find My, then Find My iPhone, and toggle it on. This ensures you can erase your phone remotely if you ever forget the passcode again.

Finally, keep your Apple ID password somewhere safe — in a password manager or written down in a find place. If you forget both your passcode and your Apple ID password, recovery takes longer and may require visiting an Apple Store.

Frequently Asked Questions

Can I unlock my iPhone without erasing it?

No. Apple's security design means the passcode cannot be bypassed without erasing the phone. There is no way to unlock an iPhone and keep the data intact if you don't know the passcode. You must erase it and restore from a backup, or set it up as new.

How long does it take to erase and set up an iPhone?

Erasing through Find My iPhone or a computer takes 10 to 20 minutes depending on the phone's storage and your internet speed. Setting up the phone afterward takes another 10 to 30 minutes depending on whether you restore from a backup. At an Apple Store, the whole process usually takes 15 to 30 minutes.

Will I lose my photos and messages if I erase my iPhone?

Only if you don't have a backup. If you have iCloud backup turned on, your photos, messages, and app data are saved to iCloud and will restore when you set up the phone again. If you don't have a backup, the data will be lost. Check your iCloud settings before erasing to see if backup is enabled.

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

Go to iforgot.apple.com and enter any email address associated with your account, or your phone number if you set that up. Apple will help you find your account. If you can't remember any of this information, visit an Apple Store with a photo ID and proof of purchase — they can help you recover your account.

Can someone else unlock my iPhone if they have my passcode?

No. Even if someone knows your passcode, they cannot erase your iPhone or set it up without your Apple ID password. The phone will ask for the Apple ID password during setup, and without it, the phone cannot be reactivated. This is why your Apple ID password is more important than your passcode.