Forgot your iPhone passcode? How to reset the iPhone
2 min read · 8 steps · Updated 2 October 2026
There is no way to read out a forgotten passcode. Enter wrong codes until iPhone Unavailable appears, tap Forgot Passcode?, tap Start iPhone Reset, enter your Apple Account password and tap Erase iPhone. This deletes everything on the phone. Afterwards you restore your data from a backup.
After several wrong passcodes the iPhone shows iPhone Unavailable or Security Lockout. Apple cannot unlock it for you. The only way back in is to erase the iPhone and set it up again, with or without a computer.
Erasing deletes all data on the phone. What comes back afterwards is what is in your last iCloud or computer backup.
Step by step
Changed the passcode recently? Try the old one
On iOS 17 and later, the old passcode still works for 72 hours after a change. On the iPhone Unavailable screen, tap Forgot Passcode? and choose the option to enter your previous passcode. Then set a new one straight away.
Check what you need for a reset without a computer
The iPhone needs iOS 15.2 or later, a working mobile data or Wi-Fi connection, and Find My must have been switched on. You also need the password of your Apple Account.
Tap Forgot Passcode?
Enter the passcode until the iPhone Unavailable message appears. Forgot Passcode? is in the bottom corner of the screen. The button only appears when the iPhone is online and Find My is on.
Start the reset and sign out
Tap Start iPhone Reset. Enter your Apple Account password. This signs the iPhone out of your account.
Erase the iPhone
Tap Erase iPhone. All data and settings are deleted. On iOS 17 and later, if you use an eSIM, you can choose to keep it or to delete it. Keep it, unless you are giving the phone away.
No button? Use a computer
Switch the iPhone off. Connect the cable to a Mac or PC, then hold the side button while you plug the cable into the iPhone. Keep holding until a picture of a computer and a cable appears. On an iPhone 7, hold the volume down button instead. On an iPhone 6s or earlier, hold the Home button.
Choose Restore on the computer
On a Mac, open Finder and click the iPhone in the sidebar. On a Windows PC, open the Apple Devices app. Choose Restore, not Update. The computer downloads the software and erases the iPhone. Apple says to allow up to 60 minutes.
Set up the iPhone again
Follow the steps on the Hello screen, restore your backup when asked and set a new passcode.
Good to know
If the download takes longer than 15 minutes, the iPhone leaves recovery mode. Let the download finish, then switch the iPhone off and start the recovery mode step again.
After the erase, the iPhone asks for the Apple Account that was used on it. Without that email address and password it cannot be set up. A repair shop cannot get around this, and services that promise to are not to be trusted.
How the restore works: how to restore an iPhone from an iCloud backup.
So that a forgotten code never costs you data again: how to back up an iPhone to iCloud.
In short: Old passcode within 72 hours, or Forgot Passcode?, Start iPhone Reset, Erase iPhone. Otherwise recovery mode and Restore on a computer.
- Apple Support: If you forgot your iPhone, iPad, or Apple Vision Pro passcode, reset your device without a computer
- Apple Support: If you forgot your iPhone passcode or your iPhone is disabled
- Apple Support: If you forget your new passcode, use your old passcode to unlock your iPhone or iPad within 72 hours
Rules and prices change. Check the official source before you act.