The "iPhone Unavailable" message appears when the wrong passcode has been entered too many times. If you changed your passcode less than 72 hours ago, you can get in with the old one without losing anything; if not, the only way out is to erase the iPhone, either from the phone itself with "Forgot Passcode?" or with a computer in recovery mode, and then restore a backup. Apple has no way to unlock it without erasing it if you don't remember the passcode. Here are the three options, in the order you should try them.

Why "iPhone Unavailable" appears

It's a protection against anyone trying to guess your passcode. After five failed attempts, the iPhone shows the "iPhone Unavailable" screen and won't let you try again for a while. On iOS 17 and later, if you keep failing you end up on the Security Lockout screen.

If you remember the passcode, just wait for the countdown to finish and type it correctly. If you don't, follow these steps.

1. Use your previous passcode (if you changed it recently)

Since iOS 17, when you change your iPhone passcode, the old one keeps working for 72 hours. It's the only option that doesn't erase anything:

  1. On the "iPhone Unavailable" screen, tap Forgot Passcode? at the bottom.
  2. Tap Enter Previous Passcode.
  3. Type the old passcode and create a new one by following the instructions.

If more than 72 hours have passed since the change, or you didn't change it, this option won't help.

2. Erase the iPhone from the phone itself (no computer)

If you don't remember any passcode, you can erase the iPhone from the Lock Screen itself. You need:

  • iOS 15.2 or later.
  • Find My turned on on the iPhone before it got locked.
  • A cellular or Wi-Fi connection.
  • The email and password of your Apple Account.

The steps on iOS 17 or later:

  1. Try to enter the passcode until the "iPhone Unavailable" screen appears.
  2. When you can, tap Forgot Passcode?.
  3. On the Security Lockout screen, tap Start iPhone Reset.
  4. Enter your Apple Account password to sign out on the device.
  5. Tap Erase iPhone. If you use an eSIM, you can choose to keep it or delete it along with your data.
  6. When the iPhone restarts, set it up again, restore your backup if you have one and create a new passcode.

On iOS 15.2 and iOS 16, "Forgot Passcode?" doesn't appear; you get the Erase iPhone option directly, with the same requirements. On those versions, if you use an eSIM, Apple recommends asking your carrier for a QR code to set it up again before you start.

Three iPhone screens: "iPhone Unavailable", "Security Lockout" with the Start iPhone Reset button, and the Erase iPhone confirmation

If you don't remember your Apple Account password, recover it first from another device: without it you won't be able to complete the erase from the iPhone itself.

3. Restore the iPhone with a computer

If the erase option doesn't appear (for example, because Find My wasn't on or the iPhone has no connection), you'll need a computer. You need a Mac or a Windows PC, a cable that can charge the iPhone, an internet connection and up to 60 minutes.

Step 1: turn off the iPhone.

  • With Face ID: press and hold the side button and the volume down button until the power-off slider appears, then drag it.
  • With a Home button: press and hold the side or top button until the slider appears, then drag it.

Step 2: enter recovery mode. Connect the cable to the computer and then to the iPhone while holding down a button, depending on the model. Don't let go when the Apple logo appears: wait until you see an image of a computer and a cable.

ModelButton to hold down
iPhone with Face ID, iPhone 8 and 8 Plus, iPhone SE (2nd and 3rd generation)Side
iPhone 7 and 7 PlusVolume down
iPhone 6s or earlier, iPhone SE (1st generation)Home

iPhone screen in recovery mode, with a drawing of a computer and a cable, next to the table of buttons by model

Step 3: restore.

  • On a Mac: open Finder, select the iPhone in the sidebar under Locations and, when "Restore or Update" appears, choose Restore.
  • On a Windows PC: install the Apple Devices app from the Microsoft Store, open it, select the iPhone, choose Trust if asked, go to General and choose Restore.

The computer downloads the iPhone software and reinstalls it. If the download takes more than 15 minutes and the iPhone exits recovery mode, let it finish, turn the iPhone off and enter recovery mode again. When it's done, you'll see the Hello screen: disconnect the iPhone and set it up.

If you don't have a computer or anyone to lend you one, you can go to an Apple Store or an Apple Authorized Service Provider.

Do you lose your data?

With options 2 and 3, yes: the iPhone ends up like new. What you get back depends on the backup you have in iCloud or on your computer. When setting it up, sign in with your Apple Account and choose to restore from the most recent backup.

Some apps have their own backup. WhatsApp, for example, stores its chats separately: if you had it turned on, you'll be able to recover them when you reinstall it.

How to stop it happening again

  • Leave Find My on: it's what lets you erase the iPhone without a computer. If privacy worries you, you can hide your location in Find My without turning it off.
  • Turn on iCloud Backup so an erase doesn't cost you photos or chats.
  • Use Face ID or Touch ID, so you type the passcode less often and are less likely to forget it.
  • Watch out for kids: many lockouts come from someone trying random passcodes. If children use your phone, consider locking the apps you don't want them to touch.

Even when the iPhone is locked, you can still make emergency calls and show your Medical ID from the Lock Screen. If you haven't set it up yet, see how to set up Medical ID and emergency contacts on iPhone.