What happens when you forget your iPhone passcode
When you forget your iPhone passcode, you cannot unlock the device or access anything on it — not your photos, messages, banking apps, or any other data. Apple does not have a master password or a way to remotely unlock your phone. You have three real paths forward: use a computer to restore the phone through iTunes or Finder, use iCloud's Find My iPhone feature if you set it up beforehand, or take the phone to an Apple Store.
Each path erases the phone and returns it to factory settings. You will lose any data that was not backed up to iCloud or another service. The time it takes ranges from 20 minutes at an Apple Store to several hours if you do it yourself at home, depending on your internet speed and which method you choose.
Key Takeaways
- You cannot reset a forgotten passcode without erasing the phone — Apple has no backdoor or master password.
- If you set up Find My iPhone before forgetting your passcode, you can erase it remotely through iCloud.com and set a new passcode.
- If you have a computer with iTunes (Windows) or Finder (Mac), you can connect the phone and restore it without needing iCloud access.
- An Apple Store can reset your phone in about 20 minutes if you bring proof of ownership, though you may wait for an appointment.
- After the reset, you will need your Apple ID and password to set up the phone again — if you do not remember that, contact Apple Support before you erase.
Using Find My iPhone through iCloud.com
If you turned on Find My iPhone before you forgot your passcode, you can erase the phone and set a new one from any web browser. Go to iCloud.com, sign in with your Apple ID and password, and click Find My iPhone. Select your phone from the list of devices.
Click the information icon next to your phone's name, then click Erase iPhone. Confirm that you want to erase it. The phone will be wiped and will restart. When it boots up, you will see the setup screen. You can now create a new passcode. You will need your Apple ID and password to finish setting up the phone — if you do not have those, stop here and contact Apple Support before erasing.
This method works even if your phone is off or not connected to the internet, because Apple's servers will send the erase command the next time the phone connects. The downside is that you must have set up Find My iPhone in Settings before you forgot your passcode.
Restoring through a Mac or Windows computer
If you have access to a computer, you can connect your iPhone with a USB cable and erase it through Finder (Mac) or iTunes (Windows). On a Mac running macOS Catalina or newer, open Finder, plug in the phone, and click the phone's name in the sidebar. Click General, then click Restore. On a Windows PC, open iTunes, plug in the phone, click the phone icon at the top left, then click Summary and Restore.
Both will read the latest iOS software and restore the phone to factory settings. This takes 15 to 30 minutes depending on your internet speed. When the phone restarts, you will see the setup screen and can create a new passcode. Again, you will need your Apple ID and password to complete setup.
This method does not require Find My iPhone to be turned on. The downside is that you need a computer with iTunes or Finder, and the phone must be able to connect to that computer via USB cable.
Getting help at an Apple Store
If you do not have a computer or do not want to do the reset yourself, you can visit an Apple Store. Bring your phone and a form of ID that matches the name on your Apple ID account. The staff will verify your identity, erase the phone, and hand it back to you. This usually takes 20 to 30 minutes, though you may need to book an appointment in advance through the Apple Store app or website.
You will still need your Apple ID and password to set up the phone after the reset. If you do not remember your Apple ID password, tell the staff before they erase the phone — they can help you reset that password through Apple's account recovery process, which can take a few days.
Recovering your Apple ID password before erasing
Before you erase your phone, make sure you know your Apple ID password. If you do not, go to iforgot.apple.com on any device and enter your Apple ID email address. Apple will send you a link to reset your password. This takes a few minutes and you can do it on a computer, tablet, or another phone.
If you do not remember your Apple ID email address either, or if you cannot access the email account linked to your Apple ID, contact Apple Support before you erase. They can verify your identity and help you recover your account. This process can take several days, so start it early if you think you will need it.
What to do if you do not remember your Apple ID password
If you erase your phone without resetting your Apple ID password first, you will be stuck at the setup screen. The phone will ask for your Apple ID and password before you can use it. You cannot skip this step — it is called set up Lock and it is designed to prevent someone else from using a stolen phone.
If this happens, go to iforgot.apple.com and reset your Apple ID password. Then return to your phone's setup screen and enter your Apple ID and the new password. If you cannot access your Apple ID email account, contact Apple Support and explain that you have erased your phone and cannot remember your password. They will walk you through identity verification and account recovery, which usually takes one to three business days.
Protecting yourself from this situation in the future
Write down your passcode and store it somewhere safe — a notebook in a drawer, a password manager like 1Password or Bitwarden, or even a note to a trusted family member. Do not store it in your phone's notes app, because you will not be able to access that if you forget the passcode.
Turn on Find My iPhone in Settings > [Your Name] > Find My > Find My iPhone. This is the fastest way to reset a forgotten passcode because you can do it from any device. Also make sure you remember your Apple ID and password, or store those in a password manager too. If you use Face ID or Touch ID to unlock your phone, you may not use your passcode often and forget it — test it once a month by restarting your phone and unlocking it with the passcode instead of biometrics.
Frequently Asked Questions
Can Apple unlock my phone without erasing it?
No. Apple has no way to unlock a phone or bypass a passcode without erasing it. This is intentional — it protects your data from theft. Even Apple staff cannot unlock a forgotten passcode without erasing the phone first.
How long does it take to reset a forgotten passcode?
At an Apple Store, about 20 to 30 minutes. At home using a computer, 15 to 30 minutes depending on your internet speed. Using Find My iPhone, a few minutes to send the erase command, then 10 to 15 minutes for the phone to restart and be ready to set up.
Will I lose my photos and messages?
Yes, unless they were backed up to iCloud or another service before you forgot your passcode. If you have an iCloud backup, you can restore from it after you set up the phone with a new passcode. Check iCloud.com to see if a recent backup exists before you erase.
What if I do not have my Apple ID password?
Reset it at iforgot.apple.com before you erase your phone. If you cannot access that email account, contact Apple Support before erasing — they can help you recover your account, but it takes a few days. If you erase first, you will be locked out until you reset your password.
Can someone else reset my iPhone if they have my phone?
Not without your Apple ID and password. After the phone is erased, set up Lock requires the Apple ID password before the phone can be used. This is why you should never give your Apple ID password to anyone, and why you should turn on Find My iPhone so you can erase a lost or stolen phone remotely.