Apple iPhone • Accounts • 20–45 minutes
I forgot my iPhone passcode — Apple iPhone
Try the Erase iPhone button on the lock screen
Why: On iPhones with iOS 15.2 or newer, entering the wrong passcode several times brings up an Erase iPhone button. It is the quickest way back in and needs no computer.
What to do: Keep entering your best guesses until Erase iPhone appears in the bottom corner of the screen. You may have to wait out a timer that says iPhone Unavailable between tries. Tap Erase iPhone, tap Erase iPhone again to confirm, then enter your Apple ID password.
What to look for: The iPhone erases itself and restarts to the Hello setup screen. If no Erase iPhone button ever appears, use the next step instead.
Erase it with a computer using recovery mode
Why: A computer can erase a locked iPhone through its recovery screen, which works even when the Erase iPhone button never appears.
What to do: Connect the iPhone to a Mac or Windows computer with its charging cable. On a Mac, open Finder. On Windows, open the Apple Devices app or iTunes. With the cable connected: quickly press and release Volume Up, quickly press and release Volume Down, then hold the Side button and keep holding until you see the recovery screen, a cable pointing at a picture of a computer. On the computer, click Restore when asked.
What to look for: The computer downloads the iPhone software and then erases the phone. This can take 15 minutes or more. If the passcode screen comes back instead, repeat the button sequence and try again.
Or erase it from iCloud on another device
Why: If the locked iPhone is signed in to iCloud, you can erase it from the web instead of connecting it to a computer.
What to do: On any other phone, tablet, or computer, open a browser and type icloud.com/find yourself. Sign in with your Apple ID, choose your iPhone from the list of devices, then choose Erase iPhone and confirm.
What to look for: The erase happens the next time the iPhone connects to Wi‑Fi or cellular service, and the iPhone restarts to the Hello setup screen.
Set the iPhone up again and restore your backup
Why: The backup is how your photos, messages, and apps come back after the erase.
What to do: Follow the setup screens. Sign in with your Apple ID when asked; this proves the iPhone is yours. On the Apps & Data screen, choose Restore from iCloud Backup, or restore from the computer, or Set Up as New iPhone if you have no backup. Then choose a new passcode you will remember, and write it down somewhere safe at home.
What to look for: Your Home screen fills in as your apps and photos download. Anything that was never backed up cannot come back.