It happens more often than people admit: a new passcode set late at night, a phone that's usually unlocked with Face ID, or an old device pulled out of a drawer. After a few wrong guesses the screen changes, and suddenly you can't get in at all.
Why Apple can't just unlock it
Your iPhone's passcode isn't only a lock screen — it's part of the encryption key that protects your data. Without it, the data on the phone can't be decrypted. That's why Apple says it can't remove the passcode for you, and why there's no secret code a store can enter. The only way back in is to erase the device and start fresh.

What the lockout looks like
After five wrong attempts, the screen shows "iPhone Unavailable" and asks you to try again in a minute. More wrong attempts add longer delays, and after enough failures the phone stops accepting guesses. If the "Erase Data" setting is turned on, ten failed attempts wipe the phone automatically.

Resetting the phone without a computer
On iOS 15.2 or later, with the phone connected to Wi-Fi or mobile data, an Erase iPhone or Forgot Passcode? option appears on the lockout screen. Tap it, confirm with your Apple Account password, and the phone erases itself. This is the quickest route and doesn't require any cables.
Resetting with a computer
If no erase option appears, you need a Mac or a Windows PC. Turn the iPhone off, connect it while holding the button for your model to enter recovery mode, then choose Restore in Finder, the Apple Devices app or iTunes. The computer downloads iOS and reinstalls it. If the download takes longer than 15 minutes, the phone may exit recovery mode — let the download finish and start again.
Getting your data back
Once the phone is erased, you set it up like new and choose Restore from iCloud Backup or Restore from Mac or PC. Photos, messages and contacts synced to iCloud reappear when you sign in. Anything that only lived on the phone since your last backup is lost — which is why automatic iCloud backups are worth turning on today.
Activation Lock
After an erase, Find My's Activation Lock asks for the Apple Account that was on the phone. This is what stops stolen iPhones from being reused — and it's why you need your Apple Account password, not just the passcode, to get going again.



