What to do if you're locked out of your own iPhone
If you've forgotten your iPhone passcode, you cannot simply bypass it — Apple's security is designed to prevent that. Your options depend on whether you have a backup, whether you remember your Apple ID password, and how much data you're willing to lose. The fastest route for most people is using iCloud's Find My iPhone feature or restoring from a backup through a computer.
If you don't have access to either of those, you'll need to erase the phone entirely and set it up as new. This takes 15 to 30 minutes but wipes all data unless you restore from a backup afterward. The key is knowing which method matches your situation before you start.
Key Takeaways
- If you remember your Apple ID password, you can unlock your iPhone through iCloud's Find My iPhone website without needing the passcode.
- A computer with iTunes or Finder can restore your iPhone from a backup, which erases the passcode but keeps your data if you have a recent backup.
- If you have neither a backup nor access to your Apple ID, you'll need to erase the phone entirely, which removes all data.
- After three failed passcode attempts, the phone adds a delay; after six attempts, it may disable for several minutes or longer.
- Recovery mode on a computer is the most reliable method when other options don't work, though it requires erasing the device.
Using Find My iPhone through iCloud if you know your Apple ID password
This is the fastest method if you remember the password to your Apple ID account. Go to iCloud.com on any computer or phone, sign in with your Apple ID, and select Find My iPhone from the menu. Locate your iPhone in the list of devices and tap it.
Select "Erase iPhone" from the options. This removes the passcode and erases all data on the phone. After the erase completes, the iPhone will restart and show the setup screen. You can then restore from an iCloud backup if you have one, or set the phone up as new. If you have a recent backup, your apps, photos, and messages will return — but the backup must have been made before you forgot the passcode.
Restoring from a backup using a computer
If you have access to a Mac or Windows computer that previously synced with your iPhone, you can restore the phone through Finder (Mac) or iTunes (Windows). Connect your iPhone to the computer with a USB cable. On a Mac running Catalina or newer, open Finder and select your iPhone from the sidebar. On Windows or older Mac, open iTunes instead.
Look for a "Restore" button in the device settings. Click it and choose a backup from the list — pick the most recent one that was created before you forgot the passcode. The computer will erase the iPhone and restore all data from that backup, including removing the passcode. This process takes 10 to 20 minutes depending on how much data is in the backup.
If no backup is available on the computer, you'll see only an "Erase" option instead of "Restore." Clicking it will erase the phone without restoring data, and you'll need to set it up as new.
Using recovery mode when other methods don't work
Recovery mode is Apple's built-in tool for fixing iPhones that won't respond normally. Connect your iPhone to a computer with a USB cable, then force the phone into recovery mode by pressing and releasing the volume-up button, pressing and releasing the volume-down button, then pressing and holding the side button until the recovery screen appears (about 10 seconds). Don't release when you see the passcode screen — keep holding until the recovery mode screen shows.
On the computer, Finder or iTunes will detect the phone and offer to restore or update it. Choose "Restore" to erase the iPhone and install the latest iOS version. This removes the passcode but also removes all data. After the restore finishes, you can set the phone up as new or restore from a backup if one is available.
What happens if you don't have a backup or Apple ID access
If you have no backup and cannot remember your Apple ID password, you'll need to erase the phone and set it up as new. Use recovery mode (described above) to erase it, then during setup, you can create a new Apple ID or sign in with a different one. You'll lose all photos, messages, and app data that weren't backed up elsewhere.
If you have a backup stored in iCloud but can't remember your Apple ID password, you can reset the password at iforgot.apple.com. You'll need access to the email address or phone number associated with the account. Once you reset the password, you can use Find My iPhone to erase the device and restore from the iCloud backup.
Why repeated passcode attempts slow down your phone
After three wrong attempts, your iPhone adds a one-minute delay before you can try again. After six attempts, the delay increases to five minutes. After ten attempts, the phone disables for 15 minutes or longer. This is intentional — it prevents someone from guessing your passcode by trying thousands of combinations quickly.
If you keep entering the wrong code after many attempts, the phone may eventually show a message saying it's disabled and direct you to connect to a computer. At that point, you'll need to use recovery mode or Find My iPhone to proceed.
Preventing this situation in the future
Set up iCloud backup so your data saves automatically. Go to Settings, tap your name, select iCloud, then turn on iCloud Backup. Your phone will back up every night when it's plugged in and connected to Wi-Fi. If you ever need to erase your iPhone again, you can restore everything from that backup.
Write down your Apple ID password or store it in a password manager. If you forget it, you can reset it at iforgot.apple.com, but having it available saves time. You can also add a trusted phone number or email address to your Apple ID account so you have multiple ways to verify your identity if you need to reset anything.
Frequently Asked Questions
Can I unlock my iPhone without erasing it?
No. If you've forgotten your passcode, there is no way to unlock the iPhone without erasing it first. Apple designed this to protect your data — even Apple cannot bypass the passcode. You can erase it and then restore from a backup to get your data back, but the erase step is required.
What if I don't remember my Apple ID password either?
Go to iforgot.apple.com and enter your Apple ID email address. Apple will send a verification link to that email or ask you to answer security questions you set up when you created the account. Once you verify your identity, you can reset your password. Then use Find My iPhone to erase your device.
How long does it take to restore an iPhone from backup?
Erasing the phone takes 5 to 10 minutes. Restoring from a backup afterward takes 10 to 30 minutes depending on how much data is in the backup and your internet speed. The entire process from start to having your phone usable again is usually 20 to 45 minutes.
Will I lose my photos and messages if I erase my iPhone?
Yes, unless you have a backup. If you have an iCloud backup made before you forgot the passcode, you can restore from it and get everything back. If you have no backup, all photos, messages, and app data will be gone permanently. This is why setting up iCloud backup now is important for the future.
Can someone else unlock my iPhone if they have my Apple ID password?
Yes. If someone knows your Apple ID password, they can use Find My iPhone to erase your device remotely. This is why your Apple ID password should be as strong as your passcode, and why you should enable two-factor authentication on your Apple ID account.