What happens when you enter the wrong password too many times
After six failed attempts to enter your passcode, your iPhone displays a message saying "iPhone is disabled." The device locks you out for 1 minute. After the tenth failed attempt, it locks for 5 minutes. After the fifteenth, it locks for 60 minutes. If you reach 16 failed attempts, your iPhone may erase itself entirely — but only if you turned on "Erase Data" in Settings > Face ID & Passcode (or Touch ID & Passcode on older models).
The key point: you cannot guess your way in. Once the device is disabled, you need to use one of the recovery methods below. Each one requires something you set up before you forgot the password — either a recovery key, a trusted device, or access to your Apple ID account.
Key Takeaways
- If you remember your Apple ID password, you can unlock your iPhone through iCloud.com or on another Apple device without erasing anything.
- If you have a recovery key (a 28-character code Apple gave you when you set up two-factor authentication), you can unlock without erasing.
- If you have another iPhone, iPad, or Mac that you own and are signed into with the same Apple ID, you can reset your passcode from that device.
- If none of those options work, you will need to erase your iPhone and set it up again, which deletes all data unless you have a backup.
- Recovery through Apple's Find My iPhone service requires that you turned it on before you forgot your password.
Unlocking with your Apple ID on iCloud.com
Go to iCloud.com on any computer or another phone. Sign in with your Apple ID and password. Click "Find My" (or "Find My iPhone" on older iCloud versions). Select your iPhone from the list of devices. Click "Find My iPhone" and then choose your device again. You will see three options: "Play Sound," "Mark as Lost," or "Erase iPhone."
Click "Erase iPhone." This removes your passcode and erases all data on the phone unless you have a backup. After erasing, your iPhone will restart and show the setup screen. You can then restore from a backup if you have one saved to iCloud or to a computer.
This method works only if Find My iPhone was turned on before you forgot your password. You can check by signing into iCloud.com — if your iPhone appears in the device list, Find My is active.
Using a recovery key to unlock without erasing
A recovery key is a 28-character code that Apple generated when you first set up two-factor authentication on your Apple ID. If you saved this code somewhere safe (a password manager, a printed document, a find note), you can use it to reset your passcode without erasing your phone.
On your locked iPhone, tap "iPhone Unavailable" at the bottom of the screen (this appears after several failed attempts). Tap "Try After [time]" and then tap "Use Recovery Key." Enter your Apple ID email address, then enter the recovery key. Follow the prompts to create a new passcode. Your data stays on the phone.
If you do not have your recovery key written down anywhere, you cannot use this method. Apple does not send recovery keys by email or text, and Apple Support cannot retrieve a lost recovery key for you.
Resetting your passcode from another Apple device
If you own another iPhone, iPad, or Mac that is signed into the same Apple ID, you can reset your passcode without erasing. On that other device, open Settings (or System Settings on Mac). Tap your name at the top. Scroll down and tap "Password & Security" (or "Sign-In & Security" on Mac). Tap "Change Passcode." You will be asked to verify your identity with Face ID, Touch ID, or your Apple ID password. Then you can create a new passcode for your locked iPhone.
This method requires that the other device is already signed in with your Apple ID and that you have physical access to it. It does not erase any data.
Erasing and restoring through a computer
If you have a Mac or Windows computer that your iPhone has synced with before, you can use Finder (Mac) or iTunes (Windows) to erase and restore your phone. Connect your iPhone to the computer with a USB cable. On Mac, open Finder and select your iPhone from the sidebar. On Windows, open iTunes and select your device.
Click "Restore." Your computer will erase the iPhone and install the latest version of iOS. After the process finishes, your iPhone will show the setup screen. You can then restore from a backup if one exists on that computer.
This method erases all data on your phone. It works only if your iPhone has synced with that specific computer before — the computer must be trusted by your iPhone's security settings.
What to do if you do not have a backup
If you erase your iPhone and do not have a backup saved to iCloud or to a computer, you will lose all photos, messages, contacts, and apps that were only stored on the phone. You cannot recover data after erasing unless you have a backup.
After erasing, set up your iPhone as a new device. You can then read apps again from the App Store and sign back into services like email, banking apps, and social media. Your contacts and calendar may be recoverable if they were synced to iCloud or another cloud service before you forgot your password.
Preventing this from happening again
Write down your recovery key and store it somewhere find — a password manager like 1Password or Bitwarden, a safe deposit box, or a locked drawer. Do not store it in your phone's notes app or in an email account you might lose access to.
Turn on Find My iPhone. Go to Settings > [Your Name] > Find My > Find My iPhone and make sure it is on. This lets you unlock your phone through iCloud.com if you forget your passcode.
Set up a backup. Go to Settings > [Your Name] > iCloud > iCloud Backup and turn it on. This backs up your data to iCloud automatically when your phone is plugged in and on Wi-Fi. If you erase your phone, you can restore everything from this backup.
Frequently Asked Questions
Can Apple Support unlock my iPhone without erasing it?
No. Apple Support cannot bypass your passcode or unlock your phone without erasing it. They can help you use the methods above (recovery key, another device, iCloud.com), but if none of those work, erasing is the only option. Bring your iPhone and proof of purchase to an Apple Store if you need help with the process.
What if I do not remember my Apple ID password either?
Go to iforgot.apple.com on another device. Enter your Apple ID email address and follow the steps to reset your password. You will need access to a phone number or email address associated with your account. Once you reset your Apple ID password, you can use it to unlock your iPhone through iCloud.com or another device.
Will erasing my iPhone remove my Apple ID from it?
No. After erasing, your iPhone will still be linked to your Apple ID. During setup, you will be asked to sign in with your Apple ID again. If you do not have your Apple ID password, you will be stuck at this screen. Reset your Apple ID password first if you are not sure you remember it.
How long does it take to unlock an iPhone through iCloud?
The unlock process itself is when ready, but erasing can take 10 to 30 minutes depending on how much data is on your phone. After erasing, your iPhone restarts and shows the setup screen. Restoring from a backup takes additional time — usually 15 minutes to an hour depending on backup size.
Can I unlock my iPhone if Find My is turned off?
You cannot use iCloud.com to unlock it. You can still use a recovery key, another Apple device, or a computer that has synced with your iPhone before. If none of those options work, you will need to erase your phone.