Forgot iPhone Passcode? How to Unlock in 2026 (Official Step-by-Step Recovery)
Forgot your iPhone passcode or stuck on 'Security Lockout'? Learn how to unlock your iPhone, bypass SMS 2FA with voice calls, and restore your photos and files from iCloud.
If you changed your passcode within 72 hours on iOS 17/18, tap 'Forgot Passcode?' to unlock with your previous code without erasing data. Otherwise, unlocking requires erasing the device, which wipes all on-device content. You can restore your data during setup ONLY if you have an active iCloud Backup (check at icloud.com). Pro tip: When logging in, select 'Phone Call' for 2FA verification since a locked screen cannot display SMS text messages.
Select your lockout situation to see the official unlock method:
How to Fix: Decision 1: Changed Passcode Within 72 Hours? Use Passcode Reset (No Data Erased - iOS 17/18)
Enter Incorrect Passcode Until "Forgot Passcode?" Appears
- ✓Type incorrect passcodes until "iPhone Unavailable" or "Security Lockout" appears with a "Forgot Passcode?" option at the bottom right.
Tap "Forgot Passcode?" > "Enter Previous Passcode"
- ✓Tap "Forgot Passcode?" at the bottom right.
- ✓If you changed the passcode within 72 hours, tap "Enter Previous Passcode".
Enter Your Old Passcode
- ✓Type the passcode you were using before the recent change.
- ✓iOS accepts the previous passcode and unlocks the iPhone immediately.
Set a New Passcode Immediately (Preserves On-Device Content)
- ✓Create a new passcode right on screen.
- ✓All your personal photos, messages, apps, and files remain intact.
Crucial truth: Unless you changed your passcode within the last 72 hours, unlocking an unavailable iPhone requires erasing the device, which wipes all on-device data. You can restore your photos, messages, and apps ONLY if you have an existing iCloud or computer backup made before the lockout—without a backup, on-device data cannot be recovered. You can log into icloud.com from a browser to check what is saved in your account. Essential 2FA Tip: When prompted for your 2-step verification code, choose 'Didn't get a code?' and select 'Phone Call' to a trusted number rather than text message, because a locked phone cannot display SMS messages on its screen.
Security & Passcode Troubleshooting FAQ
Share or Cite This Guide
Helping someone troubleshoot on Reddit, Apple Discussions, or a tech forum? Use these 1-click citation formats:
Did this fix your Security & Passcode issue?
Your feedback helps us continuously improve our visual guides.
Still unable to fix the problem?
Answer 3 quick questions to isolate whether your issue is caused by a corrupted setting, a hardware failure, or an account lock.