You restart your phone, and Face ID stops working. The screen asks for a passcode. Your brain returns nothing.
If you suddenly forgot your iPhone passcode, you have company. Face ID lets most of us skip typing the code for months, so the memory fades. This guide explains your options, what happens after 10 failed attempts, and how to avoid a repeat.
Can I unlock an iPhone if I forgot the passcode?
Yes. Apple gives you three ways back in, and every one of them resets the phone.
Apple says you must reset the device to get in after you forget the passcode. The reset erases the data currently on the iPhone. Apple lists the routes in this order:
- Try Passcode Reset first.
- Reset the iPhone on the device, with no computer.
- Reset it with a Mac or Windows PC.
Your backup decides how much you lose. After the reset, Apple's setup screens let you restore your data and settings from a backup if you have one. No backup means the old data is gone.
What happens after 10 failed passcode attempts on an iPhone?
The lockout builds in stages, so you get several warnings first.
After five incorrect attempts, Apple's lock screen shows an "Unavailable" message. Wait times then grow with each wrong guess. Guides from data recovery shops put the longest timer at about 1 hour.
Two details catch people off guard. Restarting the phone does not reset the counter or shorten the wait. Each wrong guess during a wait period extends the lockout.
The 10th failed attempt is the hard stop. Two outcomes are possible:
- Erase Data is on. This setting lives under Face ID & Passcode in Settings. When it's on, the iPhone erases itself after 10 consecutive wrong attempts.
- Erase Data is off. The phone keeps its data but stays locked. You need a reset to get in, which erases it anyway.
So a 10th wrong guess leaves you in the same place as giving up early, minus the timers. Stop guessing once you're stuck.
I randomly forgot my phone password. What can I do to unlock it?
Work through these steps in order. Start with the one that costs you the least.
Step 1: Try your old passcode
Did you change your passcode in the last 3 days? Apple lets you use the old one for 72 hours after a change. Once the Unavailable screen appears, tap Forgot Passcode?, then tap Enter Previous Passcode. Enter the old code and set a new one.
This is the only route that keeps your data with no backup. It works only when you recently changed the code.
Step 2: Reset the iPhone without a computer
On iOS 17 or later, the Forgot Passcode? button appears only when four conditions are met. Your phone must be locked out and connected to Wi-Fi or cellular. It must also be signed in to your Apple Account with Find My turned on.
If all four apply, follow Apple's steps:
- Enter a wrong passcode until the Unavailable screen appears.
- Tap Forgot Passcode? when it shows up.
- Tap Start iPhone Reset on the Security Lockout screen.
- Enter your Apple Account password to sign out.
- Tap Erase iPhone to delete your data and settings.
The phone restarts. Set it up again, restore your backup, and pick a new passcode.
One warning for older software: on iOS 16 or earlier with an eSIM, contact your carrier first. Ask for a QR code so you can set the eSIM up again.
Step 3: Reset the iPhone with a computer
Use this route when the on-device option is missing. You need a Mac or Windows PC, a cable that charges your phone, and an internet connection. Apple says to plan for up to 60 minutes.
For an iPhone with Face ID:
- Turn the phone off. Hold the side button and a volume button until the slider appears, then drag it.
- Connect the cable to your computer.
- Connect the other end to the iPhone and hold the side button.
- Keep holding through the Apple logo. Release when the computer-and-cable image appears.
- On a Mac, open Finder, select your iPhone, and choose Restore. On a Windows PC, open the Apple Devices app, select your iPhone, and choose Restore.
The software download can take more than 15 minutes. If the phone leaves recovery mode during the download, let it finish, turn the phone off, and start recovery mode again.
Older models use different buttons. iPhone 8 and iPhone SE (2nd and 3rd generation) use the side button. iPhone 7 uses Volume down. iPhone 6s and earlier use the Home button.
No computer? Apple sends you to an Apple Store or Apple Authorized Service Provider. The same goes for buttons that don't respond. That may mean the phone needs service.
Can I unlock my phone if I forgot my passcode without losing data?
Only if you remember the code before the lockout ends. Wait out the timer and enter the right passcode. Nothing on the phone gets erased.
Otherwise the answer is no. Apple's official steps all require a reset, and the Apple Community forum makes the same point: no bypass exists for a forgotten passcode.
Before you type another guess, slow down. Write down 3 or 4 codes you've used on other devices, or codes tied to birthdays and old addresses. Try the most likely one. Guess number 9 rarely beats guess number 3, and every miss costs you a longer wait.
Why you forgot your passcode (and how to avoid it next time)
Biometrics cause most of these lockouts. One Apple Community user described setting up a new iPhone and relying on fingerprint unlock. The battery died, the passcode was required, and the code was gone.
Four habits prevent this:
- Save your passcode in a password manager, not a sticky note on the fridge.
- Keep iCloud Backup on so a reset costs you minutes, not photos.
- Leave Find My on. The on-device reset option needs it.
- Check the Erase Data setting and decide if you want it. It protects a lost phone. It also punishes a toddler with your phone and a lot of free time.
A word on "unlock" tools and sketchy sites
Search results for this problem are full of paid tools promising a bypass. Apple's own guidance says a forgotten passcode requires a reset. A tool that claims to keep all your data deserves suspicion.
Never hand your Apple Account password to a site you don't recognize. Stick with Apple's support pages, an Apple Store, or an Authorized Service Provider.
The same rule covers a phone you didn't set up. If it's tied to someone else's Apple Account, Activation Lock will ask for those credentials after the reset. Only the original owner can supply them.
Quick answers
How many wrong passcodes until my iPhone locks?
Five wrong attempts bring up the Unavailable screen. Timers grow from there.
Will I lose my photos?
Yes, unless you have an iCloud or computer backup to restore.
Does restarting the phone clear the lockout?
No. The counter and the wait time stay the same.
Can Apple unlock it for me?
Apple can help you reset the device. That process erases the data on it.
The short version
Try your old passcode if you changed it in the last 72 hours. Use Forgot Passcode? if the button appears. Use a computer if it doesn't. Then turn on backups today, so the next blank moment costs you a few minutes.
Sources
- Apple Support: Use a computer to reset your iPhone and your passcode
- Apple Support: If you forgot your iPhone, iPad, or Apple Vision Pro passcode, reset your device without a computer
- Apple Support: If you forget your new passcode, use your old passcode within 72 hours
- SalvageData: iPhone Unavailable, how to regain access after a Security Lockout
- Apple Community: I forgot my iPhone passcode, how do I recover it?
- Apple Community: How to bypass the passcode on an iPhone?
