If you’ve forgotten your iPhone passcode, the only way to regain access is to erase the device, which removes the passcode and all data. This guide walks you through the official methods using iCloud, a computer, or recovery mode, depending on your situation and available backups. Before starting, ensure you know your Apple ID password and whether you have a recent backup to restore after the erase.
What You’ll Need
- Your Apple ID and password (required to disable Activation Lock after erasing).
- A computer with the latest version of iTunes (Windows) or Finder (macOS Catalina or later).
- If you have no computer, a stable Wi-Fi connection and access to iCloud.com.
- Your iPhone’s charging cable (preferably the original or a reliable MFi-certified one).
- If you plan to restore from a backup, make sure the backup is stored on iCloud or on your computer.
Step-by-Step
Method 1: Erase with iCloud (Find My iPhone)
- On a computer or another device, go to iCloud.com/find and sign in with your Apple ID.
- Click All Devices at the top, then select your locked iPhone from the list.
- Click Erase iPhone. This will remotely wipe the device and remove the passcode. If your iPhone is offline, the erase will begin the next time it connects to the internet.
- After the erase completes, you’ll see the Hello screen. Follow the on-screen setup steps. When asked, enter your Apple ID and password to disable Activation Lock.
- During setup, choose to restore from an iCloud backup (if you have one) or set up as new.
Method 2: Erase with a Computer (Finder or iTunes)
- On your computer, open Finder (macOS Catalina or later) or iTunes (Windows or older macOS).
- Connect your iPhone to the computer using a cable. If you see a prompt asking Trust This Computer, tap Trust on your iPhone (if you can) and enter your computer’s passcode if asked.
- If your iPhone is not in recovery mode, you’ll see your device’s summary page. Click Restore iPhone. If you’re asked to turn off Find My iPhone, confirm by entering your Apple ID password.
- If your iPhone is already in recovery mode (see Method 3), the computer will show a pop-up offering to Update or Restore. Choose Restore.
- Wait for the restore to finish. Your iPhone will restart and show the Hello screen. Set it up, and restore from a backup if available.
Method 3: Use Recovery Mode (When the Above Fails)
- Make sure your computer has the latest version of Finder or iTunes. If not, update it.
- Connect your iPhone to the computer, then force restart it using the correct button combination for your model:
- iPhone 8 or later (including SE 2nd gen): Press and quickly release the Volume Up button, then the Volume Down button. Press and hold the Side button until the recovery mode screen appears.
- iPhone 7 / 7 Plus: Press and hold the Side (or Top) button and the Volume Down button simultaneously until the recovery mode screen appears.
- iPhone 6s or earlier (including SE 1st gen): Press and hold the Home button and the Top (or Side) button together until the recovery mode screen appears.
- Keep holding the buttons even after the Apple logo appears—release only when you see the recovery mode screen (a computer icon with a cable).
- On your computer, a dialog will appear offering to Update or Restore. Click Restore (Update will not remove the passcode).
- Confirm the restore. The computer will download the iOS software and reinstall it on your iPhone. This can take several minutes.
- Once done, your iPhone will restart with the passcode removed. Set it up as new or restore from a backup.
Common Mistakes
- Using the wrong button combination for recovery mode—check your iPhone model carefully.
- Releasing buttons too early during recovery mode, which causes a normal restart and leaves the passcode intact.
- Choosing “Update” instead of “Restore” in Finder/iTunes—Update keeps your data but also keeps the passcode, so it won’t help.
- Forgetting your Apple ID password—you’ll need it to disable Activation Lock after the erase. If you’ve forgotten it, visit iforgot.apple.com before proceeding.
- Assuming iCloud erase works offline—the erase command only executes when the iPhone has an internet connection.
- Not backing up beforehand—if you had no backup, all data is lost permanently.
Tips
- Always maintain regular backups via iCloud or your computer so a forgotten passcode becomes a minor inconvenience, not a data disaster.
- Use a passcode you can remember, but avoid obvious ones like 123456 or your birth year. Consider using a passcode with letters and numbers if your iPhone supports it.
- If you have an Apple Watch, you can use it to unlock your iPhone (on supported models) as a convenience, but it won’t help if the passcode is forgotten.
- After erasing, set up a new passcode and consider enabling Face ID or Touch ID for easier unlocking.
- Keep your iPhone’s software up to date—Apple occasionally improves recovery and security features.
Troubleshooting
- iPhone won’t enter recovery mode: Ensure you’re using the correct button sequence for your model. If it still doesn’t work, try a different cable or USB port, and make sure your computer is awake and not locked.
- Computer says “iPhone is disabled” or “not recognized”: Install the latest version of iTunes or update macOS. Restart both the computer and the iPhone, then try again.
- Restore gets stuck or fails: Check your internet connection. If the download is interrupted, the restore may fail. Try again, and if the problem persists, use a different computer or a wired ethernet connection.
- Activation Lock asks for the previous owner’s Apple ID: This happens if Find My iPhone was enabled and you don’t have the original Apple ID credentials. You must enter them to proceed. If you’re the original owner and forgot the password, reset it via iforgot.apple.com. If you bought the phone second-hand, contact the previous owner to remove it from their account.
- iCloud erase doesn’t appear: Make sure Find My iPhone is enabled on the device (it usually is by default). If not, you’ll need to use recovery mode with a computer.
- After restore, iPhone asks for the passcode again: This can happen if you restored from a backup that was made after the passcode was set. The passcode is encrypted in the backup, so you’ll need to enter the old passcode. If you don’t know it, you’ll need to erase again and set up as new, or restore from an older backup.
Frequently Asked Questions
Will erasing my iPhone remove the passcode?
Yes, erasing the device removes the passcode and all data, returning the iPhone to factory settings.
Can I recover my data after erasing?
Only if you have a backup. If you backed up to iCloud or your computer before forgetting the passcode, you can restore that backup during setup. Otherwise, data is gone.
What if I never enabled Find My iPhone?
You can’t use iCloud to erase, but you can still use recovery mode with a computer. The process is the same as described in Method 3.
Is there any way to unlock the iPhone without erasing?
No. Apple does not provide a backdoor to bypass the passcode. The only official way is to erase the device.
What if I bought a used iPhone with a forgotten passcode?
You’ll need to erase it using recovery mode, but if Find My iPhone is enabled, you’ll need the previous owner’s Apple ID and password to disable Activation Lock. If you don’t have them, contact the seller.
How long does the restore take?
It varies depending on your internet speed and the iPhone model. Typically, the download and installation take 10 to 30 minutes, but it can be longer on slow connections.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Device Manager Shortcut: Windows 10 Desktop
- Fix Slow Wi-Fi Problem iPhone X: 9 Steps
- Show User Library in macOS High Sierra & Sierra
- How to Check if a Candidate Accepts Crypto Donations
- How to Listen to Deleted Voicemails on iPhone
- How to Watch Apple TV+ on Roku, Fire TV, Android TV & Chromecast