Forgot your iPhone passcode? Your options, in order
What to do when the screen says iPhone Unavailable, from the one route that keeps your data to the resets that don’t, and the Apple Account step that comes after.
7 minute read Facts checked 25 October 2026
You’ve typed it in a dozen times and none of them were right. Now the screen says iPhone Unavailable, or Security Lockout, and wants you to wait. It happens to a lot of people, often after a new phone, an update or a long time without using it.
This guide goes through the options Apple gives you, from the one that keeps your data to the ones that don’t. It also covers the step people get caught out by afterwards, which is the Apple Account password.
The part nobody likes
Unless you changed your passcode in the last few days, there’s no way to get into the phone without erasing it. Apple says so plainly, and anyone who promises to unlock an iPhone passcode with your photos still on it is not being straight with you.
That sounds worse than it often is. If iCloud Backup or iCloud Photos was on, most of what matters is already stored safely and comes back after the reset. If you once backed up to a computer, that copy can be restored too.
Changed it recently? Try the old one
On recent versions of iOS, if you changed your passcode in the last 72 hours, the phone lets you use the previous one for a short time. Enter wrong guesses until the lock screen shows Forgot Passcode?, tap it, and look for the option to enter your previous passcode. Once you’re in, set a new passcode straight away and write it somewhere safe.
Reset it on the phone itself
This is the simplest route if it’s available to you. You need three things: the phone connected to Wi-Fi or mobile data, Find My turned on before you got locked out, and the password for the Apple Account on the phone.
-
Keep entering a passcode
Carry on until the screen shows iPhone Unavailable or Security Lockout, with a button underneath.
-
Tap Forgot Passcode?
On older versions of iOS the button says Erase iPhone instead. If you see neither, the phone is probably offline or Find My was off. Skip to the computer method below.
-
Start the reset
Tap Start iPhone Reset, then enter your Apple Account password when asked. This signs the phone out of your account and erases it.
-
Set it up again
When the phone restarts at the Hello screen, follow the setup and choose to restore from your iCloud backup if you have one.
Reset it with a computer
If the phone won’t offer a reset on its own screen, a computer can do it. On a Mac, use Finder. On a Windows PC, use the Apple Devices app, or iTunes on older versions of Windows. You’ll need a cable that fits the phone, and a borrowed computer is fine.
-
Turn the phone off
Hold the side button and either volume button until the slider appears, then slide it. On an iPhone with a Home button, hold the side or top button.
-
Put it into recovery mode
Hold the right button while you plug the phone into the computer, and keep holding until you see a picture of a computer and a cable. On iPhone 8 and later that’s the side button. On iPhone 7 it’s the volume down button. On older models it’s the Home button.
-
Choose Restore
The computer finds the phone and offers Update or Restore. Choose Restore. It downloads the software and erases the phone, which can take a while.
-
Set it up again
Unplug the phone when it restarts, then set it up and restore from a backup.
If the phone drops out of recovery mode
A slow download can take long enough for the phone to leave recovery mode. That’s normal. Let the download finish, then put the phone back into recovery mode and choose Restore again.
Erase it from iCloud
If you have another device to hand, you can also erase the phone remotely. Go to icloud.com/find, sign in with your Apple Account, choose the locked iPhone and select Erase iPhone. The phone needs to be online for this to happen straight away. If it isn’t, it erases the next time it connects.
Without a computer or another device, an Apple Store or an Apple Authorised Service Provider can do the restore for you. They will erase the phone too. They can’t skip that part.
After the reset: your Apple Account
Erasing the phone clears the passcode but not Activation Lock. When it starts up again, it asks for the Apple Account and password that were signed in before. This is the step that catches people out, because a passcode and an Apple Account password are two different things.
- If you know your Apple Account password, sign in and carry on with setup.
- If you’ve forgotten it, reset it at iforgot.apple.com, or from another Apple device signed into the same account. If Apple can’t confirm it’s you straight away, it may start account recovery, which can take a few days.
- If the account isn’t yours, because the phone was second-hand or belonged to someone else, read what to do when a used iPhone is still linked to an Apple ID before you go any further.
Check before you erase
If you’re not completely sure whose Apple Account is on the phone, it’s worth finding out before you erase it. Once it’s reset, the only way past the setup screen is that account’s password.
Our diagnosis reads the phone’s IMEI and tells you whether Activation Lock is on, along with the network it’s tied to and whether it’s been reported lost or stolen. It won’t remove your passcode, and nothing honest can. It tells you whether Activation Lock will be waiting after the reset, though not whose account it belongs to.
If the phone is already erased and asking for an Apple ID you don’t have, our page on being locked out of an iPhone covers what can be done next.