All guides

Forgot your iPhone passcode?

Your passcode is the code you type to unlock your iPhone. It's not the same as your Apple Account password. If you've forgotten it, please stop guessing and read this first. There are a few ways back in, and some of them erase your iPhone.

The plain truth

Apple says it can't remove a forgotten passcode without erasing the iPhone. That means getting back in usually erases everything on the iPhone: photos, messages, and apps. If you have a backup, you can put your things back afterward. See Back up your iPhone. If you don't have one, whatever isn't saved in iCloud is gone.

One exception: if you changed your passcode within the last 3 days, you may be able to use your old one. That's Option 1 below.

What happens after wrong tries

Apple says that after a few wrong tries in a row, your iPhone makes you wait. The wait gets longer each time:

You'll see a message like "iPhone Unavailable" or "Security Lockout." Restarting doesn't skip the wait, because Apple says it still applies. So the best thing to do is stop and think before you try again.

There's a setting called Erase Data. If it was turned on, 10 wrong tries in a row erases the iPhone by itself. You can check it in Settings, then Face ID & Passcode, near the bottom. This only matters before you're locked out.

Ways back in, in the order Apple suggests

Option 1: You changed your passcode in the last 3 days

Apple calls this Passcode Reset. It does not erase your iPhone. It works on iOS 17 or later.

  1. Keep trying until the "Unavailable" screen appears.
  2. Tap Forgot Passcode? in the bottom corner.
  3. Tap Enter Previous Passcode, then type your old passcode.
  4. Follow the steps to choose a new passcode.

Option 2: Erase the iPhone and start fresh

This permanently deletes everything on the iPhone, then lets you set it up again. You need:

  1. On the Lock Screen, keep entering a passcode until the "Unavailable" screen appears.
  2. Tap Forgot Passcode?.
  3. On the Security Lockout screen, tap Start iPhone Reset.
  4. Enter your Apple Account password.
  5. Tap Erase iPhone.
  6. If your iPhone uses an eSIM, you may be asked whether to keep it. Apple says deleting it means contacting your carrier for a new one. If you're not sure which to choose, ask your carrier first.
  7. When your iPhone restarts, follow the steps to set it up again. Choose to restore from a backup if you have one, then pick a new passcode.

Option 3: If "Forgot Passcode?" doesn't appear

That button only shows when your iPhone is online, signed in to your Apple Account, and has Find My on. If you don't see Forgot Passcode? or Start iPhone Reset, contact Apple Support or visit an Apple Store or an Apple Authorized Service Provider. Bring proof of purchase if you have it, plus your Apple Account details.

How family can help

Make sure it doesn't happen again

  • Pick a passcode you can remember. Open Settings, tap Face ID & Passcode, then tap Change Passcode. Tap Passcode Options to see other types.
  • Write it down and keep it somewhere safe at home. Don't keep it on the iPhone. Tell one person you trust where it is.
  • If you change it, write down the old one for a few days too. You'll have 3 days to use it.
  • Don't rely on Face ID alone. Apple says your iPhone asks for the passcode after you restart it, and if you haven't unlocked it for 48 hours.
  • Keep a backup. See Back up your iPhone.
  • Keep Find My on. It needs to be on for the "Forgot Passcode?" button to appear. See Turn on Find My.
  • Passwords are different from your passcode. See Making strong, easy passwords. If you ever forget your Apple Account password too, a Recovery Contact can help. See Choose someone who can help.

Where these steps come from

Checked in November 2026 against the official pages below, using the newest iPhone software. Your screen may look a little different, especially on an older iPhone. The official page always has the latest steps.