The most direct route depends on what you remember

If you forgot your iPhone password, you have several paths forward, and which one works fastest depends on whether you have access to your Apple ID, a recovery key, a trusted device, or a computer. Apple built these routes so you can regain access without losing your data — but each one takes different steps and different amounts of time.

The fastest option is usually the one you set up before you locked yourself out. If you did not set anything up, you will need to erase the phone and start over, which means losing everything on it unless you have a backup stored elsewhere.

Key Takeaways

  • If you remember your Apple ID password, you can unlock your phone through iCloud.com or the Find My iPhone app on another device in about 10 minutes.
  • A recovery key (a 28-character code Apple gave you when you turned on two-factor authentication) lets you reset your password without needing a second device.
  • If you have a trusted device — an iPad, Mac, or another iPhone you use regularly — you can unlock your phone through that device's settings.
  • If you have none of these, you will need to erase your iPhone completely, which deletes everything on it unless you restore from a backup afterward.
  • The entire process from locked out to usable phone takes between 10 minutes and several hours depending on which method you use.

Using your Apple ID to unlock through iCloud

Go to iCloud.com on any computer or another phone and sign in with your Apple ID and password. Click Find My, then Find My iPhone. Select your locked iPhone from the list of devices.

Click the information icon next to your phone's name, then tap Erase iPhone. This erases the phone but does not delete your data permanently — when the phone restarts, you can sign back in with your Apple ID and restore everything from your backup. The process takes about 10 to 15 minutes total.

If you do not remember your Apple ID password either, you will need to reset it first. Go to iforgot.apple.com, enter your Apple ID email, and follow the prompts to verify your identity through a trusted phone number or email address. This step can take 15 minutes to an hour depending on which verification method you use.

Using a recovery key if you have one

A recovery key is a 28-character code that Apple generated when you first turned on two-factor authentication on your account. If you saved this code somewhere — in a password manager, written down, or in an email — you can use it to reset your password without needing a second device.

Go to iforgot.apple.com on any computer. Enter your Apple ID email and select "I don't have my password." When prompted for verification, choose "I have my recovery key" and enter the code. You can then create a new password and use it to unlock your phone through iCloud as described above.

If you cannot find your recovery key, Apple can verify your identity through other methods — a trusted phone number, a trusted email address, or answers to security questions you set up. This verification process typically takes 24 to 48 hours.

Unlocking through a trusted device

If you have another iPhone, iPad, or Mac that you use regularly and that is signed into the same Apple ID, you can unlock your locked phone without erasing it. On the trusted device, open Settings (iPhone or iPad) or System Settings (Mac), tap or click your name at the top, then select Password & Security.

Tap Change Password. You will see an option to change the password on your locked iPhone. Create a new password and confirm it. Your locked phone will receive a notification asking you to approve the change. Tap Allow, and your phone will unlock with the new password.

This method works only if your locked phone is connected to Wi-Fi or cellular and is powered on. It also requires that both devices are signed into the same Apple ID and that you remember the password on the trusted device.

Erasing your phone if you have no other options

If you do not have access to your Apple ID password, a recovery key, or a trusted device, you will need to erase your iPhone. Connect it to a computer with a USB cable and open Finder (Mac) or iTunes (Windows). Select your phone when it appears, then choose Restore. This erases everything on the phone.

When the phone restarts, you will see the setup screen. Sign in with your Apple ID, and your phone will restore your apps, photos, messages, and settings from your most recent backup — as long as that backup is stored in iCloud or on the computer you are using. If you have no backup, you will start with a blank phone.

This process takes 30 minutes to an hour depending on how much data you have and how fast your internet connection is. If you do not have a computer available, you can take your phone to an Apple Store, and staff there can help you erase and restore it.

What happens if your phone is disabled after too many wrong attempts

If you enter the wrong password too many times, your iPhone will display a message saying it is disabled and tell you to try again in a certain number of minutes. This is a security feature that slows down anyone trying to guess your password.

Wait the amount of time shown on the screen, then try again. If you still do not remember the password, use one of the methods above — iCloud, a recovery key, or a trusted device — rather than continuing to guess. Guessing wrong again will disable the phone for even longer.

Protecting yourself after you regain access

Once you unlock your phone, write down your password somewhere safe, or use a password manager like iCloud Keychain, 1Password, or Bitwarden to store it. Set up two-factor authentication if you have not already — this adds a second layer of security and gives you a recovery key to save for situations like this one.

Enable Face ID or Touch ID so you do not have to type your password every day. Both are more find than a password you might forget, and both let you unlock your phone quickly without the risk of being locked out.

Frequently Asked Questions

Can I unlock my iPhone without erasing it if I do not have a trusted device?

No. If you do not have access to your Apple ID password, a recovery key, or a trusted device, erasing is the only option. The erase process removes everything on the phone, but you can restore your data from an iCloud backup or a computer backup after the phone restarts and you sign back in with your Apple ID.

How long does it take to unlock an iPhone through iCloud?

The unlock itself takes about 10 to 15 minutes from the moment you sign into iCloud.com. If you also need to reset your Apple ID password first, add another 15 minutes to an hour depending on which verification method you use. Restoring your data from a backup afterward can take 30 minutes to several hours depending on how much data you have.

What if I do not have a backup of my data?

If you erase your phone and have no backup stored in iCloud or on a computer, you will lose all your photos, messages, apps, and settings. You can prevent this by turning on iCloud backup now — go to Settings, tap your name, select iCloud, then tap iCloud Backup and turn it on. Future backups will be stored automatically.

Can Apple unlock my iPhone for me?

Apple staff cannot unlock your phone with a master password or bypass. They can help you use the methods described here — resetting your Apple ID password, using a recovery key, or erasing and restoring your phone. Visit an Apple Store or call Apple Support at 1-800-MY-APPLE to walk through the process with someone.

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

Only if you have no backup. If you have iCloud backup turned on, your photos, messages, and app data are stored in iCloud and will restore automatically when you sign back in after erasing. If you have never turned on iCloud backup, you will lose everything unless you have a backup on a computer.