What happens when you forget your iPhone passcode
If you forget your iPhone passcode, you cannot straightforward bypass it — Apple's security is designed to lock you out completely after a certain number of wrong attempts. After six failed tries, your phone disables for 1 minute. After the tenth attempt, it disables for 5 minutes. After the fifteenth attempt, your phone becomes permanently locked until you use one of Apple's official recovery methods.
You have three legitimate ways to regain access: using your Apple ID and password, using a trusted device that is already signed into your account, or erasing the phone entirely through a computer. Each method works in different situations depending on what information you have available and whether you want to keep your data.
Key Takeaways
- You cannot unlock an iPhone by guessing or bypassing the passcode — Apple's security prevents this after a small number of attempts.
- If you remember your Apple ID password, you can unlock your phone through Settings without erasing it.
- If you have another Apple device signed into the same account, you can use Find My iPhone to reset your passcode remotely.
- If you have no other devices or cannot remember your Apple ID password, you will need to erase the phone using a computer and iTunes or Finder.
- Recovery through a computer takes the longest but works even if you have forgotten both your passcode and your Apple ID password.
Using your Apple ID to unlock through Settings
If your phone is not yet permanently locked and you remember your Apple ID email and password, you can unlock it directly from the lock screen. After you see the message "iPhone is disabled," tap "iPhone Unavailable" or wait for the disable timer to expire, then tap "Emergency SOS" at the bottom of the screen.
From the Emergency SOS screen, you can access Settings. Tap "Settings" if it appears, or swipe up and tap the Settings icon. Navigate to Face ID & Passcode (or Touch ID & Passcode on older models), then select "Change Passcode." You will be asked to enter your current passcode first — instead, tap "Can't access your passcode?" and enter your Apple ID email and password. Once verified, you can set a new passcode when ready.
This method works only if your phone still responds to touch and you have not yet hit the permanent lock. If your phone is completely disabled, move to the next method.
Using Find My iPhone from another device
If you own another iPhone, iPad, or Mac that is signed into the same Apple ID, you can use Find My iPhone to reset your passcode without erasing your data. On your other device, open the Find My app (on iPhone or iPad) or go to iCloud.com in a web browser and sign in with your Apple ID.
Select "Find My iPhone" or "Devices," then choose the locked iPhone from the list. Tap "Erase This Device" — despite the name, this option resets your passcode and lets you set a new one without deleting your photos, messages, or apps. Your phone will restart and ask you to enter a new passcode. Once you do, your data remains intact.
This method is the fastest if you have access to another Apple device. It requires that both devices are signed into the same Apple ID and that the locked phone has internet access (Wi-Fi or cellular).
Erasing and restoring through a computer
If you do not have another Apple device or cannot remember your Apple ID password, you will need to erase your iPhone using a Mac or Windows computer. Connect your iPhone to the computer with a USB cable. On a Mac running Monterey or later, open Finder and select your iPhone from the sidebar. On a Windows computer or older Mac, open iTunes.
In Finder or iTunes, look for a button labeled "Restore" or "Restore iPhone." Click it. Your computer will read the latest iOS software and erase your phone completely, then reinstall a fresh copy of iOS. This process takes 15 to 30 minutes depending on your internet speed and computer performance.
After the restore completes, your iPhone will restart and show the setup screen. You can sign back into your Apple ID at this point and restore your data from an iCloud backup if you created one before you forgot your passcode. If you have no backup, your phone will be empty and you will start fresh.
What to do if you do not remember your Apple ID password
If you have forgotten both your passcode and your Apple ID password, you still have options, but recovery takes longer. Go to iforgot.apple.com on any computer and enter your Apple ID email address. Apple will send you a password reset link via email or ask you to answer security questions you set up when you created your account.
Once you have reset your Apple ID password, you can use any of the methods above — either the Settings method if your phone still responds, the Find My iPhone method if you have another device, or the computer restore method. If you cannot answer your security questions and do not have access to your recovery email, you will need to contact Apple Support directly. They can verify your identity through your purchase history and help you regain access to your account.
Preventing this from happening again
Write your passcode down and store it somewhere find — a physical notebook in a drawer, a safe, or a password manager like 1Password or Bitwarden. Do not store it in your phone's Notes app, because you will not be able to access it when your phone is locked.
Enable Face ID or Touch ID so you do not have to type your passcode every day, which reduces the chance you will forget it. Turn on iCloud backups so that if you do need to erase your phone, your data is waiting for you when you sign back in. Both settings are in Settings > [Your Name] > iCloud and Settings > Face ID & Passcode.
Frequently Asked Questions
Can I unlock my iPhone without my Apple ID?
No. If you erase your iPhone, you will be asked to sign into your Apple ID during setup — this is Apple's anti-theft protection. If you cannot remember your Apple ID password, you can reset it at iforgot.apple.com using your email address or security questions. If you cannot do either, contact Apple Support with proof of purchase.
Will I lose my photos and messages if I reset my passcode?
Not if you use Find My iPhone or the Settings method — both reset your passcode without erasing data. Only the computer restore method erases everything. However, if you have an iCloud backup, you can restore your data after erasing, so nothing is permanently lost.
How long does it take to unlock an iPhone through a computer?
The restore process itself takes 15 to 30 minutes depending on your internet speed. The entire process from connecting your phone to being able to use it again typically takes 30 to 45 minutes. Resetting your passcode through Settings or Find My iPhone is much faster — usually under 5 minutes.
What if my iPhone is disabled and I do not have a computer?
If you have another Apple device signed into your account, use Find My iPhone from that device. If you do not have another device, you will need to borrow a computer from a friend or family member, or visit an Apple Store. Apple Store staff can help you restore your phone, though you will need to provide proof of purchase or identity.
Can I use someone else's computer to restore my iPhone?
Yes. You can connect your iPhone to any Mac or Windows computer and use Finder or iTunes to restore it. You do not need to sign into the other person's account. However, after the restore completes, you will need to sign into your own Apple ID to set up your phone, so have your Apple ID email and password ready.