What to do if you've forgotten your iPhone password
If you've forgotten your iPhone password, you have several paths forward depending on whether you remember your Apple ID password, have access to a trusted device, or need to erase the phone to start over. Apple built these recovery routes into every iPhone specifically for this situation — you're not locked out permanently, but the fastest option depends on what you remember and what devices you have nearby.
The key difference is between unlocking a phone you own (getting past the lock screen) and removing set up Lock (the security that ties the phone to your Apple ID). Both may be necessary, and both have different paths. Start with the method that matches what you have access to right now.
Key Takeaways
- If you remember your Apple ID password, you can unlock your iPhone through iCloud.com or use a trusted device to reset the passcode without erasing anything.
- If you have another Apple device (Mac, iPad, or another iPhone) that you're signed into with the same Apple ID, you can reset your passcode through the Find My app without losing data.
- If you don't remember your Apple ID password either, you'll need to verify your identity through recovery contacts, a trusted phone number, or a recovery key before you can proceed.
- Erasing the iPhone through recovery mode removes the passcode but also removes all data unless you restore from a backup afterward.
- The entire process can take anywhere from minutes (if you have a trusted device) to several days (if Apple needs to verify your identity).
Using a trusted device to reset your passcode
If you have another iPhone, iPad, or Mac that's signed into your Apple ID, this is the fastest route. On that device, open the Find My app (on iPhone or iPad) or Find My Mac (on a Mac). Tap or click your name at the bottom of the screen, then select the iPhone you're locked out of from the list of devices.
Tap "Find My iPhone" or the device name, then scroll down and tap Reset Passcode. You'll be asked to verify your Apple ID password — type it in. The phone will reset the passcode to nothing, and you can set a new one when ready. Your data stays on the phone. This works even if the locked iPhone is not nearby, as long as it's powered on and connected to the internet.
If you don't see the option to reset the passcode, the phone may not have Find My enabled. In that case, move to the next method.
Resetting through iCloud.com if you remember your Apple ID password
Go to iCloud.com on any computer or another phone and sign in with your Apple ID. Click Find My, then click Find My iPhone. Select your iPhone from the list of devices. Click the circle next to the device name, then click Reset Passcode.
You'll be asked to enter your Apple ID password again. After you do, the passcode on your iPhone will be cleared. You can then set a new one the next time you pick up the phone. Like the trusted device method, this keeps your data intact.
This method requires that Find My iPhone is turned on. If the phone was never set up with Find My, or if it's been disabled, you won't see it listed. In that case, you'll need to use recovery mode (see below).
Erasing the iPhone through recovery mode
If you don't have a trusted device, don't remember your Apple ID password, and can't verify your identity through other means, erasing the phone is the last option. This removes the passcode but also removes all data on the phone unless you restore from a backup afterward.
Connect the iPhone to a computer with a USB cable. On the computer, open Finder (Mac) or iTunes (Windows). The phone should appear in the sidebar. Click it, then look for a button that says Restore. Click it and confirm. The computer will read the latest iOS and install it, erasing the phone in the process.
If the phone doesn't appear in Finder or iTunes, you may need to force it into recovery mode. The steps vary by iPhone model — for newer iPhones without a home button, quickly press and release the volume up button, quickly press and release the volume down button, then press and hold the side button until you see the recovery screen. For older iPhones with a home button, press and hold both the top (or side) button and the home button together until the recovery screen appears.
Once the phone is erased, you'll be asked to set it up again. You can sign back into your Apple ID at that point. If you have a backup from before you forgot the password, you can restore from it and get your data back.
What to do if you don't remember your Apple ID password
If you've forgotten both your iPhone passcode and your Apple ID password, you'll need to reset your Apple ID password before you can use the methods above. Go to iforgot.apple.com on any device and enter your Apple ID (usually your email address).
Apple will ask you to verify your identity. You can do this through a trusted phone number (a number Apple has on file for your account), a recovery contact (another person you've designated), or a recovery key (a code you may have saved when you set up two-factor authentication). Choose whichever one you have access to.
Once you've verified your identity, you can reset your Apple ID password. After that, use the iCloud.com method or a trusted device method described above to reset your iPhone passcode.
Understanding set up Lock and why it matters
After you unlock your iPhone or erase it, you may encounter set up Lock — a security feature that requires your Apple ID password before anyone can use the phone. This is separate from the passcode. If you've erased the phone, you'll see a screen asking for your Apple ID when you try to set it up again.
Sign in with your Apple ID and password. If you don't remember your Apple ID password at this point, use iforgot.apple.com to reset it first, then come back to the phone and sign in. set up Lock can't be bypassed — it's designed to prevent theft — but it can be removed by signing in with the correct credentials.
What happens if you're locked out of your Apple ID entirely
If your Apple ID account is locked for security reasons (usually after multiple failed sign-in attempts), you won't be able to unlock your iPhone through any of the methods above until you regain access to your Apple ID. Go to iforgot.apple.com and follow the account recovery process.
Apple may ask you to wait a certain amount of time before trying again, or to verify your identity through additional steps. This can take several hours to several days depending on how locked down your account is. Once your Apple ID is accessible again, you can proceed with resetting your iPhone passcode.
Frequently Asked Questions
Can I unlock my iPhone without erasing it if I don't have a trusted device?
Only if you remember your Apple ID password. You can use iCloud.com to reset the passcode without erasing. If you don't remember your Apple ID password, you'll need to reset that first through iforgot.apple.com, which requires verifying your identity through a trusted phone number, recovery contact, or recovery key.
How long does it take to reset my passcode through iCloud?
The reset itself is when ready once you sign in. However, it can take a few minutes for the change to reach your iPhone if it's not connected to the internet. If the phone is offline, the passcode will reset the next time it connects.
Will I lose my photos and messages if I erase my iPhone?
Yes, erasing removes everything on the phone. However, if you have an iCloud backup or a computer backup from before you forgot the password, you can restore from it after the phone is erased and get your data back. Check iCloud.com to see if a recent backup exists before you erase.
What if my trusted phone number is no longer active?
You can update your trusted phone number on iCloud.com if you can sign in with your Apple ID. If you can't sign in, use iforgot.apple.com and verify your identity through a recovery contact or recovery key instead. If you have neither, Apple's account recovery process can take several days.
Can someone else unlock my iPhone if they know my Apple ID password?
Yes — that's why it's important to keep your Apple ID password separate from your iPhone passcode and to use a strong, unique password. If you think someone else has your Apple ID password, change it when ready at iforgot.apple.com.