To remove an iPhone lock code, erase the device with Apple’s reset steps, then restore your data from a backup.
Forgetting your iPhone passcode feels rough, but the fix is plain once you know what Apple allows. You can’t view the old code, guess around it, or pull it out of settings. A passcode reset on iPhone means wiping the phone, installing iOS again, and setting it up from scratch or from a backup.
That sounds harsh. Still, it keeps the phone secure if it falls into the wrong hands. The upside is simple: if you have an iCloud backup or a backup on your Mac or PC, you can get your photos, apps, messages, and settings back after the erase. If you don’t, the phone can still be used again, but the data stored only on that device is gone.
What A Passcode Reset On iPhone Actually Does
Here’s the plain version. Apple doesn’t offer a button that swaps your passcode while keeping the locked phone untouched. The passcode protects the data itself. So when too many wrong tries lock you out, Apple’s approved path is to erase the device.
No hidden trick changes that. No master code does either. If a site claims it can reveal your old passcode without wiping the phone, treat that claim with caution. The real path is erase, then restore.
How To Reset Your iPhone Passcode If You Forgot It
The reset path depends on what your iPhone shows on screen. Some phones let you erase from the lock screen. Others need recovery mode with a Mac or PC. Both paths end at the same place: a fresh setup screen.
Before You Start
Take one minute and gather the bits that matter:
- Your Apple Account email and password.
- A charging cable and, if needed, a Mac or Windows PC.
- A rough idea of your last backup date.
- Enough battery life to finish the erase and setup.
If you can still sign in to iCloud on another device, check whether a recent backup exists. That one step can save a lot of stress once the phone is wiped.
If The Erase Option Appears On The Lock Screen
On many newer iPhone setups, the lock screen itself can offer an erase path after repeated failed attempts. Apple spells out that flow in its Erase iPhone from the lock screen page. When that option appears, the phone needs a network connection and you’ll need your Apple Account password to finish the wipe.
This route is the cleanest one because you don’t need Finder or iTunes. Tap the erase option, confirm the action, and let the phone remove the data. Once it restarts to the Hello screen, you can set it up again.
If You Need A Mac Or PC
If there’s no erase option on the lock screen, use Apple’s forgotten passcode reset steps. The phone must be turned off first. Then you place it into recovery mode, connect it to your Mac or PC, and choose Restore when Finder or iTunes detects it.
For iPhones With Face ID Or A Side Button
Most recent models use the side button to enter recovery mode. Turn the phone off. Hold the side button while connecting the cable, then keep holding until the recovery mode screen appears. On your Mac or PC, choose Restore, not Update. Restore wipes the phone and installs a fresh copy of iOS.
For iPhones With A Home Button
Older models with a Home button use that button for recovery mode. The idea is the same: power the phone down, hold the correct button while connecting it, and wait for the recovery mode screen. Then select Restore on the computer.
Don’t unplug the iPhone midway. If the download takes a while and the phone exits recovery mode, just repeat the button steps and start again.
| What You See | What It Means | What To Do Next |
|---|---|---|
| iPhone Unavailable | Too many wrong passcode attempts were entered. | Wait for the timer, then use the erase path or recovery mode. |
| Security Lockout | The phone is locked after repeated failed tries. | Use the erase option on screen if it appears. |
| Erase iPhone | Your phone can wipe itself from the lock screen. | Sign in with your Apple Account and confirm the erase. |
| Connect To Computer | The phone needs Finder or iTunes to continue. | Use recovery mode and choose Restore. |
| Apple Account Password Prompt | Apple is checking device ownership. | Enter the same account tied to the phone. |
| Hello Screen | The erase is done and setup can begin. | Pick a backup or set up as new. |
| Activation Lock | Find My is still tied to your account. | Sign in with the correct Apple Account to activate. |
| Restore From Backup | A backup is available for your device. | Choose the newest one that matches your needs. |
What Happens After The Erase
Once the phone reboots, you’ll land on the Hello screen. From there, you can set the device up as new or bring your data back with Apple’s restore from an iCloud or computer backup steps. If you backed up the phone last night, great. Your reset is mostly a time issue. If your last backup is months old, expect a gap between that backup date and what returns.
This part trips people up: the passcode reset does not pull data out of a locked phone and save it first. The erase comes first. The restore comes after. So your real safety net is the backup you already made before getting locked out.
If you changed your passcode only a short time ago, check the lock screen for any prompt tied to a recent prior code. Apple has offered that grace path on some newer versions. When it appears, it can save you from a full erase.
| Path | Best Fit | Main Trade-Off |
|---|---|---|
| Erase On The Lock Screen | You see the erase option and know your Apple Account details. | Local data is wiped before setup starts. |
| Recovery Mode Restore | No erase option appears or the phone is stuck. | You need a Mac or PC and enough time for the download. |
| Restore From Backup | You backed up to iCloud or a computer. | You return to the state of that backup, not the locked moment. |
| Set Up As New | No usable backup exists. | The phone works again, but old local data does not return. |
Common Mistakes That Slow The Reset
You can save yourself a pile of time by skipping a few common missteps:
- Guessing over and over. More failed tries only lengthen the lockout timer and add stress.
- Mixing up passcodes. The lock screen passcode, Screen Time code, and Apple Account password are three different things.
- Choosing Update instead of Restore. If Finder or iTunes shows both, Restore is the one that wipes the phone and clears the passcode block.
- Forgetting Activation Lock. After the erase, you still need the Apple Account tied to the device.
- Skipping the backup check. A one-minute look at your last backup date tells you what can come back after setup.
Also, don’t borrow a random public computer unless you have no other option. A Mac or PC you control is a cleaner route, and it makes backup access easier if you already saved the phone there.
When The Problem Is Not The Passcode
Sometimes the passcode is only part of the mess. A smashed screen can stop you from using on-screen options. A work-issued iPhone may be managed by a company profile that adds extra rules. And if you bought the phone secondhand and it’s still tied to someone else’s Apple Account, the wipe won’t remove Activation Lock.
In those cases, the reset steps still matter, but ownership and hardware issues need to be cleared too. Once those are sorted, the erase-and-restore flow is still the path that gets the iPhone usable again.
If you came here hoping for a trick that keeps the locked phone untouched, there isn’t one that Apple approves. But if you want the clean path that works now, it’s simple: erase the phone, sign back in, and restore your data if a backup is there.
References & Sources
- Apple.“Erase iPhone from the lock screen.”Shows when the lock screen can wipe the phone without using a Mac or PC.
- Apple.“Forgotten passcode reset steps.”Gives Apple’s current recovery mode process for erasing a locked iPhone.
- Apple.“Restore from an iCloud or computer backup.”Explains how to return apps, settings, and data after the phone has been erased.
