You can regain access through your Apple ID, a trusted device, or recovery mode — the fastest route depends on what you have available right now

If you've forgotten your iPhone passcode, you have three main paths forward. The quickest is using a trusted device or your Apple ID on iCloud.com. If neither of those works, you'll need to use recovery mode, which erases the phone but lets you set a new passcode. Which route you take depends on whether you have access to another Apple device, remember your Apple ID password, and how much data you're willing to lose.

The key difference: the first two methods preserve your data. Recovery mode does not. But recovery mode works even if you've forgotten your Apple ID password or don't have another device nearby.

Key Takeaways

  • If you have another Apple device (iPad, Mac, Apple Watch), you can unlock your iPhone through Find My iPhone on iCloud.com without erasing it.
  • If you remember your Apple ID password but don't have another device, you can unlock your phone through Settings on the locked screen itself — no data loss.
  • Recovery mode erases your iPhone completely but works when you've forgotten both your passcode and Apple ID password.
  • You'll need either a computer with a USB cable, or another Apple device, to start any of these processes.
  • After you regain access, set up Face ID or Touch ID so you don't have to remember a passcode at all.

Unlocking through Find My iPhone if you have another Apple device

This is the fastest route if you own an iPad, Mac, or Apple Watch. Go to iCloud.com on any web browser and sign in with your Apple ID. Click Find My, then Find My iPhone from the menu on the left.

Select your iPhone from the list of devices. Click Erase iPhone. This removes your passcode but keeps all your photos, messages, and apps intact. After the erase completes, your phone will ask you to sign in with your Apple ID. Once you do, your data restores automatically.

The whole process takes 5 to 15 minutes depending on your internet speed. Your phone needs to be powered on and connected to the internet for this to work.

Unlocking through Settings if you remember your Apple ID password

You can reset your passcode directly on your locked iPhone without another device. On the lock screen, tap the option that says "iPhone Unavailable" or "Try Again Later" — keep tapping until you see "Use Recovery Mode" or "Erase iPhone" at the bottom. Tap "Erase iPhone."

Your phone will ask for your Apple ID email and password. Enter them. Your iPhone erases and restarts, then asks you to set a new passcode. Your data comes back once you sign in with your Apple ID.

This method works on any iPhone running iOS 15.1 or later. If you don't see the erase option on your lock screen, your phone is running an older version and you'll need to use recovery mode instead.

Using recovery mode when you've forgotten both passcode and Apple ID password

Recovery mode is your last resort because it erases everything on your phone. You'll need a computer (Mac or Windows PC) with a USB cable. Connect your iPhone to the computer, then open Finder on Mac or iTunes on Windows.

Force restart your iPhone while it's plugged in. The exact button combination depends on your model: on iPhone 8 and newer, quickly press Volume Up, quickly press Volume Down, then hold the Side button until you see the recovery screen. On iPhone 7, hold Volume Down and the Top button together. On iPhone 6s and earlier, hold the Home button and the Top button.

When the recovery screen appears in Finder or iTunes, click Restore. Your computer downloads the latest iOS software and installs it on your phone. This takes 15 to 30 minutes. When it finishes, your iPhone restarts and asks you to set up as new or restore from a backup — but only if you have a backup stored in iCloud or on that same computer.

What happens to your data in each scenario

MethodData preservedWhat you needTime required
Find My iPhone (another device)Yes — everything restoresAnother Apple device + Apple ID password5–15 minutes
Settings erase (on locked phone)Yes — everything restoresApple ID email and password only10–20 minutes
Recovery mode (computer)Only if you have a backupComputer + USB cable15–30 minutes

Why you should set up Face ID or Touch ID after you regain access

Once you're back in your phone, go to Settings, then Face ID & Passcode (or Touch ID & Passcode on older models). Set up biometric unlock so you never have to remember a passcode again. You'll still need a passcode for emergencies — like when your face is covered or your finger is injured — but you won't use it every day.

If you don't want to use your face or fingerprint, at least choose a passcode you can actually remember. Write it down and store it somewhere safe — not in your phone, and not in a note titled "My Passcode." A password manager like iCloud Keychain (built into every iPhone) stores it encrypted and syncs across your devices.

If you don't remember your Apple ID password either

You'll need to reset it before you can use the Settings erase method or restore from backup. Go to iforgot.apple.com on any device and enter your Apple ID email. Apple will send you a link to reset your password, or ask you security questions if you set those up when you created your account.

This usually takes a few minutes. Once your password is reset, you can go back to your iPhone and use the Settings erase method described above. If you can't remember the email address associated with your Apple ID, you'll have to use recovery mode instead.

Frequently Asked Questions

Will I lose my photos and messages if I use recovery mode?

Yes, unless you have a backup. If you backed up to iCloud before you forgot your passcode, your data will restore when you sign back in. If you never set up iCloud backup, or if your last backup was months ago, you'll lose everything since then. Check Settings > [Your Name] > iCloud > iCloud Backup to see if backups are turned on.

Can I unlock my iPhone without a computer or another Apple device?

Only if you remember your Apple ID password. Use the Settings erase method on your locked screen — it doesn't require another device. If you've forgotten both your passcode and your Apple ID password, you need either a computer for recovery mode or another Apple device for Find My iPhone.

How long does it take to regain access?

Find My iPhone is fastest at 5 to 15 minutes. Settings erase takes 10 to 20 minutes. Recovery mode takes 15 to 30 minutes because your computer has to read and install the entire iOS operating system. The exact time depends on your internet speed and how full your phone is.

What if my iPhone is disabled and says "iPhone is disabled, try again in 60 minutes"?

That message appears after too many wrong passcode attempts. Wait the time shown, or use one of the methods above to erase your passcode instead of guessing. Don't keep guessing — each wrong attempt increases the wait time.

Can Apple unlock my iPhone for me?

No. Apple doesn't have a master key to unlock iPhones, even with proof of purchase. You have to use one of the three methods above. If you're locked out of your Apple ID as well, you can visit an Apple Store with your ID to verify your identity and reset your password in person.