Forgotten iPhone passcodes usually end one of two ways: a quick reset with your previous passcode, or a full erase before you can use the phone again. If the 72-hour option does not apply, Apple’s current consumer fixes remove the passcode by erasing the iPhone, then letting you set it up with a new one.
Start with the fastest option below, then move down only if that path does not fit your iPhone.
1. Try the previous passcode within 72 hours
Use this first if you recently changed the passcode. On iOS 17 or later, Apple lets you unlock with the old passcode for 72 hours after changing it. The Forgot Passcode? option only appears when the iPhone is connected to cellular or Wi-Fi.
- 1.From the Lock Screen, enter the wrong passcode five times until iPhone Unavailable appears.
- 2.Tap Forgot Passcode?
- 3.Tap Enter Previous Passcode.
- 4.Enter the old passcode.
- 5.Follow the onscreen instructions to set a new passcode.
Once the new passcode is set, the old one stops being the code you use to unlock the iPhone.
2. Reset the iPhone from the lock screen
Enter passcodes until iPhone Unavailable appears, then tap Forgot Passcode?. On the Security Lockout screen, tap Start iPhone Reset. Enter your Apple Account password.
Next, tap Erase iPhone. After the restart, set up the iPhone and choose a new passcode.
If the previous-passcode option is gone, use the built-in reset flow on iOS 17 or later. This erases the iPhone, so you need the Apple Account password, an active cellular or Wi-Fi connection, and Find My already enabled.
Some iPhones on iOS 15.2 or iOS 16 show the older Erase iPhone button instead. If you use an eSIM on iOS 16 or earlier, contact your carrier first and ask for a QR code to set up the eSIM again. When that button appears, tap Erase iPhone, enter your Apple Account password, confirm the erase, then set the iPhone up again.
3. Restore it with Finder on a Mac
Use recovery mode when the lock-screen reset is not available. Finder restores the iPhone and erases the forgotten passcode along with the current contents of the device.
Turn off the iPhone, then connect the cable to the Mac. Connect the cable to the iPhone while holding the recovery button for your model: side button for iPhone with Face ID, iPhone 8, iPhone 8 Plus, and iPhone SE 2nd or 3rd generation; Volume down for iPhone 7 or 7 Plus; Home for iPhone 6s or earlier and iPhone SE 1st generation.
Keep holding until the computer-and-cable recovery screen appears. Open Finder on the Mac. On macOS Mojave or earlier, use iTunes instead.
Select the iPhone under Locations. If prompted, allow the accessory. Choose Restore when Finder offers Restore or Update.
After the Hello screen appears, set up the iPhone and create a new passcode.
4. Use Apple Devices on Windows
Turn off the iPhone, then connect the cable to the PC. Connect the cable to the iPhone while holding the correct recovery button for your model: side button, Volume down, or Home. Keep holding until the recovery screen appears.
Open Apple Devices, then select the iPhone in the sidebar. Select Trust your device if that prompt appears. Select General.
After that, select Restore and follow the onscreen instructions.
On a Windows PC, Apple’s current restore path uses the Apple Devices app. If the PC does not have Apple Devices, use iTunes instead. Put the iPhone into recovery mode first, then restore it from the app.
If you need the Windows app, use Apple’s download page for Apple Devices from the Microsoft Store.
5. Erase the iPhone remotely
Remote erase works when Find My was enabled before the lockout and you can sign in with the Apple Account tied to the iPhone. If the iPhone is offline, the erase starts when it comes online.
From iCloud.com: Go to icloud.com/find, sign in with your Apple Account, select All Devices if needed, choose the locked iPhone, then select Erase iPhone or Erase This Device.
From another Apple device: Open Find My, tap Devices, tap the locked iPhone, tap Erase This Device, tap Continue, then follow the onscreen instructions.
After the erase, restore from a backup during setup or set up the iPhone as new.
6. Clear Activation Lock after erasing
Erasing the iPhone removes the forgotten passcode, but Activation Lock can still stop setup. Enter the Apple Account and password used to set up the iPhone, or enter the device passcode if Apple offers that option during setup.
If you own the Apple Account and need to remove the device on the web, go to icloud.com/find, sign in, select the iPhone, then click Remove This Device. If you cannot use the Apple Account credentials, start Apple’s Activation Lock support request and provide proof of purchase.
Forgot the Apple Account password too? Go to iforgot.apple.com, click Reset Password, and follow Apple’s account recovery steps. Apple says the wait can take several days or more, and Apple Support cannot shorten it.
7. Skip old bypass tricks
Siri tricks, Voice Control tricks, Emergency Call workarounds, Medical ID paths, Emergency SOS paths, backup restores before erasing, and DFU-mode tutorials are not current Apple-supported ways to unlock an iPhone after you forget the passcode.
The supported consumer options are the 72-hour previous-passcode reset, on-device erase, remote erase, or recovery-mode restore. For a personal iPhone, those are the paths that get you back to setup and a new passcode.
8. Contact Apple or your administrator
If you do not have a computer and cannot borrow one, Apple says to visit an Apple Store or Apple Authorized Service Provider for help. Access still requires erasing the locked iPhone.
For a work, school, or managed iPhone, contact the organization that manages it. Administrators may have supervised-device or MDM options such as Clear Passcode or device erase, but those tools are not available for ordinary personal iPhones.
Frequently Asked Questions
Can I unlock my iPhone without erasing it?
Yes, but only when the iOS 17 or later 72-hour previous-passcode option applies. Otherwise, Apple’s current consumer methods erase the iPhone before you regain access.
What do I need before using Start iPhone Reset?
You need iOS 17 or later, Find My enabled before the lockout, an active cellular or Wi-Fi connection, and the Apple Account password.
Will erasing the iPhone remove Activation Lock?
No. Activation Lock can still require the Apple Account and password used to set up the iPhone after the erase.
What if I forgot my Apple Account password too?
Use iforgot.apple.com and choose Reset Password to start account recovery. Apple says the wait can be several days or more, and Apple Support cannot shorten it.
Can a school or company unlock a managed iPhone?
A managed iPhone may support administrator actions such as Clear Passcode or remote erase through Apple Configurator or MDM. Contact the organization that manages the device.