Pocket How
Passcode and privacy

Forgot your iPhone passcode? What to do

Works on iPhone. By Cihat Salik, updated .

Short answer

If you changed the passcode in the last 72 hours, tap Forgot Passcode? and enter the old one. Otherwise the only way in is to erase the iPhone, which deletes everything on it, and restore it from a backup.

Use your old passcode, within 72 hours

  1. Enter a wrong passcode five times until the iPhone shows the Unavailable screen.

  2. Tap Forgot Passcode? in the lower corner.

  3. Tap Enter Previous Passcode and type the old one.

  4. Set a new passcode when asked. Nothing is erased.

Erase it from the Lock Screen

  1. On the Unavailable screen, tap Forgot Passcode?. The iPhone needs Wi-Fi or cellular and Find My turned on.

  2. Tap Start iPhone Reset and enter your Apple Account password.

  3. Tap Erase iPhone. This permanently deletes all your data and settings.

  4. When it restarts, set it up and restore from your iCloud or computer backup.

Use recovery mode with a computer

  1. Turn the iPhone off. On a Face ID model, hold the side button and volume down until the slider appears.

  2. Connect it to a Mac or Windows PC with a cable while holding the side button. Keep holding until the computer and cable screen appears.

  3. On a Mac, open Finder. On Windows, open the Apple Devices app. Select the iPhone and choose Restore.

  4. If it takes more than 15 minutes and the iPhone leaves recovery mode, start the steps again.

If it still does not work

There is no way to recover a forgotten passcode without erasing the iPhone. Without a backup, the photos, messages and files on the phone are gone after the erase. If you have no computer, an Apple Store or Apple Authorised Service Provider can help.

Checked against Apple Support

FocusCard: Earn Screen Time

When you set the phone up again, FocusCard can close the apps you pick and needs no account, VPN or profile.

Download on the App Store
FocusCard on iPhone, App Store screenshot 1FocusCard on iPhone, App Store screenshot 2FocusCard on iPhone, App Store screenshot 3FocusCard on iPhone, App Store screenshot 4
  • Closes the apps you pick, alone or by group such as Social or Games
  • Opens them again for steps walked, push-ups or time spent reading
  • Plan cards block apps at set hours, in Soft or Hard mode

Built on Apple Screen Time: no VPN, no profile, no account.

We make FocusCard. You do not need it for the steps above.

FocusCard website: how it works, guides and support

See every app we make

Questions people also ask

  • Can I get my photos back after erasing?

    Only from a backup or from iCloud Photos if it was turned on. The erase itself cannot be undone.

  • Why do I not see Forgot Passcode?

    It needs iOS 17 or later, a network connection, Find My turned on and an Apple Account signed in. If any is missing, use recovery mode.

More things your iPhone can do

FocusCard Also from us Get