Skip to main content
    Step 1 of 5
    Phone & Tablet
    Intermediate

    What to Do If You Forgot Your iPhone Passcode

    If you forget your iPhone passcode and get locked out, you have options to regain access — but most involve erasing the device. Here is what to try first and what to do if you must erase.

    4 min read 5 stepsApril 19, 2026Verified April 2026
    1

    Try Face ID or Touch ID first

    ~19s
    If your iPhone is not completely locked out yet and you just cannot remember the number, try Face ID or Touch ID (fingerprint). These bypass the passcode for daily unlocking. If Face ID works, unlock your phone, go to SettingsFace ID & Passcode → tap "Change Passcode" to set a new, memorable code.
    2

    Try your old passcodes

    ~27s
    Before attempting a full erase, think carefully: is it possible you used 0000? Your birthday? Your last 4 digits of your phone number? Your home address numbers? A previous PIN from another account? Try each one with time between attempts to avoid lockout. Note: you only get a limited number of tries.

    Warning

    Do NOT keep guessing if you are close to 10 attempts. If your iPhone shows "Security Lockout" with a countdown, wait for it to reset — do not keep trying wrong codes.

    3

    Use iPhone Recovery Mode to erase and restore

    ~31s
    If you cannot unlock, use Recovery Mode. Connect your iPhone to a computer with a USB cable. On iPhone 8 or later: press and quickly release Volume Up, press and quickly release Volume Down, then press and hold the Side button until the recovery mode screen appears (a cable pointing to a computer). In Finder (Mac) or iTunes (Windows), click "Restore iPhone." This erases the phone and installs fresh iOS.

    Quick Tip

    If you use a Mac with macOS Catalina or later, use Finder instead of iTunes. Open Finder and click your iPhone in the sidebar.

    4

    Restore from an iCloud backup

    ~28s
    After the erase completes, your iPhone restarts and shows the setup screen. Go through setup until you reach "Apps & Data." Tap "Restore from iCloud Backup." Sign in to your Apple ID. Choose your most recent backup from the list. Your apps, photos, contacts, and settings restore automatically (this takes 15–60 minutes depending on how much data you have).

    Quick Tip

    Quick Tip: After restoring, go to SettingsFace ID & Passcode and set a new passcode you will remember. Write it down somewhere safe at home.

    5

    Prevent lockouts in the future

    ~22s
    Set a passcode you will remember — use 6 digits and choose something meaningful to you (but not obvious to others). Enable Face ID or Touch ID so you rarely need to type the passcode. Turn on automatic iCloud backup: Settings → your name → iCloud → iCloud BackupBack Up Now. With a recent backup, a future lockout is inconvenient but not devastating.

    You Did It!

    You've completed: What to Do If You Forgot Your iPhone Passcode

    Need more help? Get Expert Help from a TekSure Tech

    Getting locked out of your iPhone because you forgot your passcode is more common than you might think. Maybe you set up a device for the first time, tried an unfamiliar passcode too many times, or forgot a PIN you set months ago.

    Here is what happens when you enter the wrong passcode repeatedly: - After 5 wrong attempts: iPhone is disabled for 1 minute - After 6 wrong attempts: disabled for 5 minutes - After 7 wrong attempts: disabled for 15 minutes - After 10 wrong attempts: iPhone is permanently disabled (or erased if that setting is on)

    If your iPhone is showing "iPhone is unavailable" or a timer, stop trying passcodes.

    Every wrong attempt makes it worse.

    Important:

    Apple designed iPhone security so that even Apple cannot unlock your phone without the passcode. This is intentional for your protection. The only way to regain access to a locked iPhone without the passcode is to erase it and restore from a backup.

    If you have iCloud backup on (most people do) and recently backed up, you can restore your iPhone, set a new passcode, and get all your content back from the backup.

    The key question is: do you have a backup? If yes, recovery is straightforward. If no, erasing means starting fresh (but the phone will work again).

    Was this guide helpful?

    Your feedback helps us make TekSure better for everyone.

    Want to rate with stars?

    Still have questions?

    Ask TekBrain a follow-up question about this guide. It’s free, no sign-up needed, and the answer will be in plain English.

    forgot passcode
    iphone locked
    recovery mode
    erase iphone
    passcode reset

    Official Resources

    Sources used to create and verify this guide. View all sources →

    Still stuck? Let a pro handle it.

    Our verified technicians can fix this issue for you — remotely or in person.

    What to Do If You Forgot Your iPhone Passcode — Step-by-Step Guide | TekSure