The fastest way depends on what you remember
If you've forgotten your iPhone passcode, you have three main paths forward: use your Apple ID to reset it through iCloud, restore the phone through a computer, or take it to an Apple Store. Which one works depends on whether you remember your Apple ID password, whether you have access to a trusted device or recovery email, and how much time you have. None of these routes will recover your data if you don't have a backup — the phone will be wiped during the reset process.
The fastest option for most people is the iCloud method if you remember your Apple ID password and have another device (iPad, Mac, or another iPhone) handy. If you don't remember your Apple ID password, you'll need to reset that first through Apple's account recovery page before you can unlock your phone. If you have neither a backup device nor a recovery email you can access, your only option is to restore the phone through a computer using Apple's Finder (on Mac) or iTunes (on Windows).
Key Takeaways
- If you remember your Apple ID password, you can unlock your iPhone through iCloud.com from any web browser without needing another device.
- If you don't remember your Apple ID password, you must reset it first at iforgot.apple.com using your recovery email or phone number before you can unlock your iPhone.
- If you have a Mac or Windows computer, you can restore your iPhone through Finder (Mac) or iTunes (Windows) without needing your Apple ID password at all.
- Taking your phone to an Apple Store requires proof of purchase or identity but avoids the need to remember passwords or have a computer available.
- All reset methods erase your phone's data unless you restore from a backup afterward, so the process is permanent if you have no backup saved.
Reset through iCloud if you remember your Apple ID password
Go to iCloud.com from any web browser on any device — a computer, tablet, or someone else's phone. Sign in with your Apple ID and password. Click the Find My app icon (it looks like a radar circle). Select Find My iPhone from the menu on the left.
Click All Devices at the top of the screen and select your iPhone from the list. A panel will open on the right showing your phone's location. Click Erase This Device. Confirm that you want to erase it. Your phone will be wiped and you'll be able to set it up again from scratch. When you reach the lock screen setup, you can create a new passcode.
This method works even if your phone is powered off or in airplane mode, because Apple's servers will send the erase command as soon as the phone connects to the internet again. You don't need the phone in front of you to start the process.
Reset your Apple ID password first if you don't remember it
Go to iforgot.apple.com in any web browser. Enter your Apple ID (usually your email address). Apple will ask you to verify your identity using either a recovery email address or a phone number you registered with your account.
If you choose email recovery, Apple will send a link to the recovery email address on file. Click that link and follow the prompts to create a new password. If you choose phone recovery, Apple will send a code to the phone number on file via text or call. Enter that code on the iforgot page and create a new password.
Once you've reset your Apple ID password, go back to iCloud.com, sign in with your new password, and follow the steps in the section above to erase your iPhone through Find My.
Restore your iPhone through a computer if you have no other options
Connect your iPhone to a Mac or Windows computer using a USB cable. On a Mac running Monterey or newer, open Finder and click your iPhone in the sidebar. On a Mac running Big Sur or older, or on any Windows computer, open iTunes.
In Finder or iTunes, you'll see a summary panel for your phone. Click Restore. A dialog will ask whether you want to restore and update. Click Restore again to confirm. Your phone will read the latest iOS software and erase itself completely. This process takes 10 to 20 minutes depending on your internet speed.
When the restore finishes, your phone will restart and show the setup screen. You can set up a new passcode at that point. This method does not require your Apple ID password, but you will need to sign in with your Apple ID during setup to reactivate the phone — if you don't remember that password, you'll need to reset it first using iforgot.apple.com.
Visit an Apple Store if you have proof of purchase
Apple Stores can reset your passcode without needing your Apple ID password or a computer. Bring your iPhone and a form of ID (driver's license, passport, or state ID). If you don't have the original receipt, bring a credit card you used to buy the phone — Apple can look up the purchase in their system.
The process takes 15 to 30 minutes. Apple will verify your identity, erase the phone, and set it up so you can create a new passcode. You'll walk out with a phone ready to use. This is the simplest option if you have proof of purchase and an Apple Store nearby, because you don't have to remember any passwords or have a computer available.
If you don't have proof of purchase or ID, Apple cannot reset the phone. This is a security measure to prevent someone from erasing a stolen phone.
Restore from a backup after your phone is reset
After you've reset your passcode and set up your phone again, you can restore your data from a backup if you have one. During the setup process, you'll see a screen that says "Apps & Data." Choose "Restore from iCloud Backup" if you have an iCloud backup, or "Restore from Mac/PC" if you have a backup on a computer.
If you chose iCloud, sign in with your Apple ID and select which backup to restore from. The phone will read your apps, photos, messages, and settings from that backup. This can take 30 minutes to several hours depending on how much data you have and your internet speed.
If you have no backup, your phone will be empty after the reset. You can read your apps again from the App Store and sign back into services like email and social media, but photos, messages, and other personal data will be gone.
Prevent this from happening again
Turn on automatic iCloud backups so your data is saved even if you forget your passcode. Go to Settings, tap your name at the top, select iCloud, then tap iCloud Backup. Toggle it on. Your phone will back up automatically when it's plugged in, locked, and connected to Wi-Fi.
Write down your Apple ID password or store it in a password manager like 1Password or Bitwarden. If you lose it, you can reset it at iforgot.apple.com, but having it written down saves time. Store the written copy somewhere find — a locked drawer, a safe, or a trusted family member's house.
Consider using Face ID or Touch ID instead of a passcode if you find yourself forgetting numbers. You can still set a passcode as a backup, but you won't need to type it every day.
Frequently Asked Questions
Will resetting my passcode delete my photos and messages?
Yes, unless you restore from a backup afterward. The reset process erases everything on the phone. If you have an iCloud backup or a computer backup, you can restore your data after the reset is complete. If you have no backup, your data is permanently gone.
Can I reset my passcode without an Apple ID?
You can erase the phone without your Apple ID password by using a computer and Finder or iTunes. However, you will need to sign in with your Apple ID during setup after the erase is complete. If you don't remember your Apple ID password, you must reset it at iforgot.apple.com before you can finish setting up the phone.
How long does it take to reset my passcode?
Through iCloud, the erase command is sent when ready, but it may take a few minutes for your phone to receive it if it's offline. Through a computer, the restore takes 10 to 20 minutes. At an Apple Store, the process takes 15 to 30 minutes. Restoring from a backup afterward can take 30 minutes to several hours depending on how much data you have.
What if I don't have access to my recovery email or phone number?
If you can't access your recovery email or the phone number on your Apple ID, you can still restore your iPhone through a computer using Finder or iTunes. You won't be able to sign back into your Apple ID during setup, but Apple will let you create a new Apple ID or skip that step temporarily. Contact Apple Support if you need help recovering your original Apple ID.
Can someone else reset my iPhone passcode?
Only if they have your Apple ID password, access to your recovery email, or proof of purchase to show an Apple Store. This is intentional — it prevents someone from stealing your phone and erasing it. If your phone is stolen, report it to Apple and your carrier when ready so they can block it from being used.