Forgetting an iPhone passcode feels awful, especially when Face ID or Touch ID has been doing the work for months. Then the phone restarts, the battery dies, or an update finishes—and suddenly it needs the passcode again.
Here’s the honest truth: in most cases, you cannot “unlock” an iPhone without the passcode. What you can do is reset (erase) the iPhone to remove the passcode, then sign in and restore your data from a backup
There is one important exception: if you recently changed your passcode, you may be able to use your previous passcode within 72 hours (more on that below).
TL;DR — QUICK ANSWER
If you forgot your iPhone passcode, your main options are:
- Try Passcode Reset (old passcode within 72 hours) if you recently changed it.
- Erase on the iPhone using “Forgot Passcode?” / “Start iPhone Reset” (requires internet + Find My + Apple Account password).
- Use a computer (Recovery Mode) and restore with Finder (Mac) or Apple Devices app (Windows).
If you forgot your iPhone passcode, you can’t bypass it — you’ll need to erase your device and restore from a backup. The fastest way is tapping “Forgot Passcode?” right on the lock screen (iOS 17+), or use Recovery Mode with a Mac/PC. You can also erase remotely through iCloud Find My. All methods wipe your data, so a backup beforehand is the only way to keep your stuff safe.
Why Is My iPhone Locked?
It happens more often than you might think. You set a new passcode, got busy, and now you can’t remember what it was. Maybe you haven’t picked up an older iPhone in a while and the numbers just don’t come back to you. Or perhaps a child grabbed your phone and entered the wrong code too many times.
Whatever the reason, Apple takes security seriously. After several wrong passcode guesses, your iPhone shows an “iPhone Unavailable” or “iPhone is Disabled” message. This is actually a good thing — it means nobody can just guess their way into your phone. But it also means that if you are the owner and you truly forgot the code, you will need to go through a reset process to get back in.
The important thing to understand right away: there is no hidden shortcut to bypass an iPhone passcode without erasing the device. Any website or tool that promises otherwise is either misleading or potentially harmful. Apple designed it this way to keep your personal data safe from strangers and thieves.
Before You Start: What You Need to Know
Before you jump into any of the methods below, there are a few things worth knowing. These will save you time and help you avoid losing data unnecessarily.
Your Apple ID is Key
Every method for unlocking a locked iPhone requires your Apple ID (or Apple Account) password at some point. If you used Find My iPhone, your device is protected by something called Activation Lock. That means even after a full erase, the phone will ask for your Apple ID credentials before it can be set up again. So keep your Apple ID password somewhere safe — you will need it.
Backups Save the Day
Resetting your iPhone erases everything on it. That includes photos, messages, apps, and settings. However, if you have been backing up to iCloud or to a computer through iTunes or Finder, you can restore all that data after the reset. The phone goes back to almost exactly the way it was before, minus the forgotten passcode.
⚠️No backup? If you never backed up your iPhone, any data on the device will be permanently lost after a reset. There is no way to recover it once the phone is erased. This is why regular backups matter so much.
Method 1: Reset Passcode Directly on Your iPhone (iOS 15.2+)
This is the easiest method and it doesn’t even require a computer. If your iPhone runs iOS 15.2 or later (which includes most iPhones sold in the last few years), Apple gives you an option to reset right from the lock screen after several failed passcode attempts.
Step 1: Enter the wrong passcode on the lock screen until you see the “iPhone Unavailable” screen. On iOS 17 and later, look for the “Forgot Passcode?” option in the bottom corner. On iOS 15.2 through iOS 16, tap “Erase iPhone” instead.
Step 2: Tap the option and your iPhone will ask you to enter your Apple ID password to confirm the erase. This proves you are the real owner of the device.
Step 3: Your iPhone will erase itself and restart. You will see the Hello screen — the same one you saw when you first bought the phone. Follow the setup steps and choose to restore from an iCloud or iTunes backup if you have one.
💡Tip: Your iPhone needs an internet connection for this method to work, because it has to verify your Apple ID with Apple’s servers. Make sure you are connected to Wi-Fi or have cellular data available.
Method 2: Use Recovery Mode With a Computer
This is Apple’s official method and it works on every iPhone, regardless of iOS version. You will need a Mac or Windows PC and a cable that can connect your phone to the computer. The whole process takes around 15 to 60 minutes depending on your internet speed.
What You Need
A Mac running macOS Catalina or later (use Finder) or a Windows PC with the Apple Devices app installed. You also need a USB cable — the same one you use to charge your iPhone — and an internet connection for the computer to download the latest iOS software.
Step-by-Step Instructions
Step 1 — Turn Off Your iPhone Press and hold the Side button and Volume Down button at the same time (on iPhones with Face ID) until the power off slider shows up. Slide it to turn off your phone. For iPhones with a Home button, press and hold the Side or Top button instead.
Step 2 — Enter Recovery Mode Connect the cable to your computer first. Then plug the other end into your iPhone while holding down the Side button (Face ID models). Keep holding the button — even when the Apple logo shows up — until you see a picture of a computer with a cable on your screen. That means you are in recovery mode.
For iPhone 7/7 Plus: hold the Volume Down button instead. For iPhone 6s and earlier: hold the Home button.
Step 3 — Restore in Finder or Apple Devices On a Mac, open Finder and select your iPhone from the sidebar. On Windows, open the Apple Devices app. You should see a prompt saying there is a problem with the iPhone. Click “Restore” to erase and reinstall iOS.
Step 4 — Set Up Your iPhone When the process finishes, your iPhone restarts with the Hello screen. Disconnect from the computer and set up your phone. If you have a backup, restore it during setup.
⚠️Heads up: The iOS download can take over 15 minutes. If your iPhone restarts and exits recovery mode during the download, just let the download finish on your computer, then turn off the phone and enter recovery mode again.
Method 3: Erase iPhone Through iCloud Find My
If you don’t have a computer nearby, you can erase your locked iPhone remotely using Apple’s Find My service. This works from any web browser on another device — another phone, a tablet, or even a friend’s computer.
Step 1: Open a browser and go to iCloud.com/find. Sign in with the same Apple ID used on the locked iPhone.
Step 2: Click “All Devices” at the top and choose your locked iPhone from the list.
Step 3: Click “Erase iPhone.” Confirm your choice. The phone will be wiped remotely and returned to factory settings.
Step 4: Once the phone restarts, set it up fresh and restore from a backup if one is available.
Keep in mind that your iPhone needs to be connected to the internet (Wi-Fi or cellular) for this remote erase to go through. If the phone is completely dead or offline, the erase command will wait and process the next time the phone connects.
Method 4: Restore From an iTunes or Finder Backup
This one only works in a very specific situation. If you had previously synced your iPhone with a particular computer using iTunes (Windows) or Finder (Mac), and that computer is still “trusted,” you may be able to connect and restore the phone without entering recovery mode.
Plug your iPhone into the computer you used to sync with. Open iTunes or Finder and see if the computer recognizes the phone. If it does, you can click “Restore Backup” and pick the most recent backup. The phone should reset with the backup data, including removing the old passcode lock.
Honestly though, this method rarely works these days because most people back up to iCloud rather than a computer. And if the iPhone requires you to “trust” the computer, you would need to unlock the phone first — which creates a catch-22. Still, it is worth a try if you have a computer that was previously synced.
Method 5: Visit an Apple Store or Authorized Service Provider
If none of the above methods work for you, or if you are simply not comfortable doing this yourself, Apple is there to help. You can bring your locked iPhone to any Apple Store or Apple Authorized Service Provider. The staff there will walk you through the reset process.
You will still need to prove ownership of the device. Bring your government-issued photo ID and, if possible, the original proof of purchase. Having your Apple ID credentials ready will speed things up a lot.
💡Pro tip: Book an appointment at the Genius Bar before you go. Walk-in availability can be hit or miss depending on how busy the store is. You can schedule a visit through Apple’s Support website or the Apple Support app.
Method Comparison: Which One Should You Use?
Here is a quick breakdown of all five methods to help you decide which one fits your situation best.
| Method | Computer Needed? | Requirements | Best For |
|---|---|---|---|
| On-Device Reset | No | iOS 15.2+, Apple ID, internet | Quickest option for newer iPhones |
| Recovery Mode | Yes | Mac or PC, USB cable | Works on any iPhone model |
| iCloud Find My | No (any browser) | Apple ID, iPhone online | Remote erase without a computer |
| iTunes/Finder Backup | Yes (trusted PC) | Prior sync with that computer | If you still sync with a computer |
| Apple Store Visit | No | Photo ID, Apple ID | If you need hands-on help |
What Happens After Failed Passcode Attempts on iPhone?
Apple uses a system of increasing lockout periods to slow down anyone trying to guess your passcode. Here is exactly what happens with each round of wrong entries:
After the 10th failed attempt, your iPhone becomes permanently locked. It will no longer show a timer or let you try again. The only way forward at that point is to erase the phone using one of the methods described above.
If you previously turned on the “Erase Data” setting (found in Settings → Face ID & Passcode), your iPhone will automatically wipe itself clean after 10 failed attempts. The data gets erased, but the device remains locked to your Apple ID through Activation Lock — so a thief still can’t use it.
How to Protect Your Data Going Forward
Now that you have gone through the trouble of resetting your iPhone, let’s make sure this doesn’t happen again. Here are a few practical habits that will save you a lot of stress in the future.
Turn on iCloud Backup
Go to Settings → [Your Name] → iCloud → iCloud Backup and make sure it is turned on. Your iPhone will back up automatically every night when it is plugged in and connected to Wi-Fi. This way, even if you need to erase your phone again someday, you won’t lose your photos, messages, or app data.
Use a Memorable Passcode
Choose a passcode that means something to you but isn’t obvious to others. Avoid simple patterns like 1234 or 0000. A six-digit passcode is a good balance between security and convenience. You can also set up Face ID or Touch ID so you rarely have to type in the passcode at all.
Store Your Passcode Safely
Write it down and keep it in a safe place at home, or use a password manager app on another device. Many people in online forums say they changed their passcode and immediately forgot the new one. Having a written backup prevents that kind of situation entirely.
Set Up a Recovery Contact or Recovery Key
Apple lets you choose a trusted person as a recovery contact for your Apple ID. If you ever get locked out of your Apple Account, this person can help you get back in. It is an extra layer of protection that takes only a minute to set up.
Yes, but you cannot unlock it without erasing the data on the device. Apple’s security features are designed to protect your information. You’ll need to reset your iPhone using one of the methods above, then restore from a backup if you have one.
You can regain access to your iPhone, but the process will erase everything on it. Once erased, you can set up the phone again and restore your data from a backup. There’s no way to get in without erasing first.
You have three options: use the Forgot Passcode feature directly on your iPhone (iOS 17 or later), put your iPhone in recovery mode and restore it using a computer, or erase it remotely through iCloud’s Find My feature. All three methods require you to know your Apple ID password.
After 10 wrong passcode attempts, your iPhone may automatically erase all data if you turned on that option in Settings. If you didn’t turn on auto-erase, your iPhone becomes permanently disabled and shows “iPhone is Disabled, Connect to iTunes.” You’ll need to use recovery mode to restore it.
If you forgot your passcode, you cannot manually unlock your iPhone without erasing it. Apple does not have a backdoor or secret code to bypass the passcode. This is by design to keep your private information secure.


