Your main options when you can't remember your passcode
If you've forgotten your iPhone passcode, you have three realistic paths forward: use your Apple ID to reset it through iCloud or Recovery Mode, restore from a backup you made before you forgot the code, or take the phone to an Apple Store where staff can verify your identity and help you regain access. None of these routes is when ready, and all require proof that you own the device — Apple's security is designed this way on purpose.
The fastest option for most people is iCloud's Find My iPhone feature, which can erase your passcode remotely if you remember your Apple ID password. If you don't have iCloud set up or can't access it, Recovery Mode (done through a computer) is the next step. Both methods erase the phone's contents unless you have a backup to restore afterward.
Key Takeaways
- If you remember your Apple ID password, you can use iCloud's Find My iPhone to reset your passcode from any web browser or another device.
- Recovery Mode, accessed through a Mac or Windows computer connected to your iPhone, can reset your passcode but requires erasing the phone first.
- An Apple Store can help you regain access if you can show a photo ID that matches the name on your Apple ID account.
- Having a backup stored in iCloud or on a computer means you can restore your photos, messages, and apps after resetting your passcode.
- If you set up a recovery contact or recovery key through your Apple ID, you may be able to reset your password without erasing the phone.
Using iCloud to reset your passcode remotely
Go to iCloud.com from any computer or another device and sign in with your Apple ID and password. Click Find My, then Find My iPhone from the menu on the left. Select your iPhone from the list of devices.
Click the device name, then choose Erase iPhone. This will wipe the phone and remove your forgotten passcode. You'll be asked to confirm your Apple ID password — this is Apple's way of making sure you actually own the device. After the erase completes (which can take several minutes), your iPhone will restart and show the setup screen.
When you set up the phone again, you can sign back into your Apple ID and restore your data from an iCloud backup if you have one. This is the fastest method if you remember your Apple ID password and have already turned on Find My iPhone in your settings.
Using Recovery Mode on a computer
Connect your iPhone to a Mac or Windows computer using a USB cable. Open Finder (Mac) or iTunes (Windows). Your iPhone should appear in the sidebar or device list.
Click your device, then look for a Restore button. Before you click it, make sure you know your Apple ID password — you'll need it after the restore completes. Click Restore and follow the prompts. The computer will read the current iOS software and install it on your phone, which erases everything including your passcode.
This process takes 15 to 30 minutes depending on your internet speed and which iPhone model you have. Once it finishes, your phone will restart and show the setup screen. You'll sign back in with your Apple ID, and you can restore from a backup at that point if you have one saved.
Getting help at an Apple Store
If you don't remember your Apple ID password and don't have access to a computer, an Apple Store can help you. Bring a photo ID that matches the name on your Apple ID account. Staff will verify your identity and can reset your passcode or help you regain access to your account.
Wait times vary by location and time of day. You can make a Genius Bar appointment through the Apple Store app or website to avoid a long walk-in wait. Bring your ID and be ready to answer security questions about your account. The whole process usually takes 30 minutes to an hour.
What to do if you have a recovery contact or recovery key
If you set up a recovery contact through your Apple ID settings before you forgot your passcode, that person can help you reset your password without erasing your phone. You'll need to ask them to go to their own device, open Settings, tap their name, then Passwords and Security, and look for a request from you.
If you saved a recovery key (a 28-character code) when you set up two-factor authentication, you can use it to reset your Apple ID password on the iPhone's setup screen. Tap "Can't access your account?" and follow the prompts to enter your recovery key. This path also avoids erasing your phone.
Restoring your data after you regain access
After you've reset your passcode and set up your iPhone again, you can restore your photos, messages, contacts, and apps from a backup. If you have an iCloud backup, sign into your Apple ID during setup and choose to restore from iCloud. If you have a backup on a computer, connect to that computer and use Finder or iTunes to restore.
Restoring from backup takes 10 to 30 minutes depending on how much data you have. Your phone will restart a few times during the process. Once it finishes, your apps and data will be back, though some apps may need to read their latest version from the App Store.
Preventing this from happening again
Write your passcode down and store it somewhere find — a password manager, a locked drawer, or a trusted person's contact information. Turn on Find My iPhone in Settings > [Your Name] > Find My > Find My iPhone. This makes it possible to reset your passcode remotely without a computer.
Set up a recovery contact and save your recovery key in a safe place. Both of these are in Settings > [Your Name] > Passwords and Security. A recovery contact can help you reset your password without erasing your phone, and a recovery key works even if you forget your Apple ID password.
Frequently Asked Questions
Will I lose all my photos and messages if I reset my passcode?
Only if you don't have a backup. If you have an iCloud backup or a backup on a computer, you can restore everything after you reset your passcode. If you don't have a backup, the data will be gone. This is why setting up iCloud backups in advance matters.
What if I don't remember my Apple ID password either?
Go to iforgot.apple.com and enter your Apple ID email address. Apple will send you a link to reset your password. You'll need access to the email address or phone number tied to your account. If you can't access those, an Apple Store can help you verify your identity and regain access.
Can someone else unlock my iPhone if they know my passcode?
No. Even if someone has your passcode, they can't erase it or change it without also knowing your Apple ID password. This is intentional — it's designed to prevent theft. Your Apple ID is the real lock on your device.
How long does it take to reset my passcode through iCloud?
The erase itself takes 5 to 15 minutes depending on your internet speed and how much data is on the phone. Setup and restoring from backup can add another 15 to 30 minutes. Plan for 30 to 45 minutes total if you have a backup to restore.
What if my iPhone is locked and I can't turn it on?
If your phone won't turn on at all, you'll need to use Recovery Mode on a computer. Connect it to a Mac or Windows computer with a USB cable, open Finder or iTunes, and follow the Restore steps. Recovery Mode can revive a phone that won't start, though it will erase the device.