Locked out of iPhone passcode: how to unlock or reset your iPhone

If you are locked out of your iPhone passcode, use Passcode Reset with your old passcode if you changed it in the last 72 hours; otherwise you must erase the iPhone, either from the Security Lockout screen or with a computer in recovery mode, then restore your data from a backup.

This guide covers all three Apple routes, which one fits your iPhone, how to get your data back, Activation Lock after the erase, and what to do when a step will not appear.

Locked out of iPhone passcode: how to unlock or reset your iPhone
The iPhone Unavailable screen appears after five incorrect attempts; Forgot Passcode? sits in the bottom corner. (Image: Apple)

Unlock a locked iPhone with Passcode Reset

Passcode Reset works on iOS 17 and later when you changed the passcode within the last 72 hours. It keeps all your data.

  1. On the Lock Screen, keep entering a passcode until the iPhone Unavailable screen appears after five incorrect attempts.
  2. Tap Forgot Passcode? in the bottom corner of the screen.
  3. Tap Enter Previous Passcode.
  4. Enter your old passcode.
  5. Follow the onscreen instructions to set a new passcode immediately.

Forgot Passcode? appears only when the iPhone is connected to cellular or Wi-Fi, signed in to your Apple Account, and has Find My turned on. If you have not changed the passcode in the last 72 hours, use one of the reset methods below.

Locked out of iPhone passcode: Enter Previous Passcode on Forgot Passcode screen
Passcode Reset works on iOS 17 or later only when the passcode was changed within the last 72 hours. (Image: Apple)

Which iPhone passcode recovery method should you use?

Your situation Method Data kept?
Changed the passcode in the last 72 hours, iOS 17 or later Passcode Reset with the old passcode Yes
iOS 17 or later, online, Find My on, you know your Apple Account password Start iPhone Reset from the Security Lockout screen No, restore from backup
iOS 15.2 or iOS 16, online, Find My on Erase iPhone on the lockout screen No, restore from backup
No network, Find My off, or older iOS Recovery mode restore with a Mac or Windows PC No, restore from backup
No computer available Apple Store or Apple Authorized Service Provider No

Apple's order is the same: try Passcode Reset first, then the on-device reset, then a computer.

What you need to reset a locked iPhone

Route Requirements
Passcode Reset iOS 17 or later, passcode changed within 72 hours, old passcode, network connection, Apple Account signed in, Find My on
Reset on the iPhone iOS 15.2 or later, Find My previously enabled, active cellular or Wi-Fi connection, Apple Account and password
Reset with a computer Mac or Windows PC, a cable that can charge the iPhone, internet connection, up to 60 minutes
Windows PC Apple Devices app from the Microsoft Store
Getting data back An iCloud backup or a backup on your computer made before the lockout

Reset a locked iPhone without a computer (Security Lockout)

This erases the iPhone from the lock screen. On iOS 16 or earlier with an eSIM, contact your carrier first and ask for a QR code to set up the eSIM again.

  1. Enter a passcode on the Lock Screen until iPhone Unavailable appears.
  2. Tap Forgot Passcode? when it appears.
  3. On the Security Lockout screen, tap Start iPhone Reset.
  4. Enter your Apple Account password to sign out of your Apple Account on the iPhone.
  5. Tap Erase iPhone; with an eSIM on iOS 17 or later, choose whether to keep or delete the eSIM.
  6. After the restart, follow the setup steps, restore from a backup, and set a new passcode.

On iOS 15.2 and iOS 16 the lockout screen shows Erase iPhone directly instead of Forgot Passcode?.

Reset locked iPhone without computer: erase prompt with keep or delete eSIM
On iOS 17 or later, choose whether to keep or delete the eSIM before the iPhone erases itself. (Image: Apple)

Reset iPhone passcode with a computer in recovery mode

Use this when the iPhone cannot show Forgot Passcode?. It erases the iPhone and reinstalls iOS.

  1. Turn off the iPhone: on Face ID models, hold the side button and Volume down button until the slider appears; on Home button models, hold the top or side button. Drag the slider.
  2. Connect the cable to your Mac or Windows PC, then to the iPhone, and immediately hold the correct button (see the table below). Do not release it.
  3. Keep holding through the Apple logo until the image of a computer and a cable appears.
  4. On a Mac, open a Finder window and select the iPhone under Locations; on Windows, open Apple Devices and select the iPhone.
  5. Choose Restore when offered Restore or Update, and follow the onscreen instructions.
  6. When the Hello screen appears, disconnect the iPhone and set it up.

The iOS download can take more than 15 minutes. If the iPhone leaves the recovery screen before it finishes, let the download complete, turn the iPhone off and enter recovery mode again.

Reset iPhone passcode with a computer: Finder Restore prompt in recovery mode
Choose Restore, not Update, to erase the iPhone and reinstall iOS when the passcode is forgotten. (Image: Apple)

Recovery mode button for each iPhone model

iPhone model Button to hold after connecting the cable
iPhone with Face ID Side button
iPhone 8, iPhone 8 Plus, iPhone SE (2nd and 3rd generation) Side button
iPhone 7, iPhone 7 Plus Volume down button
iPhone 6s and earlier, iPhone SE (1st generation) Home button

If the buttons do not respond, the screen stays black, or the computer-and-cable screen never appears, the iPhone may need service. The same button layouts are used to force restart an iPhone that is frozen.

Restore your data after resetting the iPhone passcode

  1. Turn on the erased iPhone and follow the setup steps until the Transfer Your Apps & Data screen.
  2. Tap From iCloud Backup and sign in to your Apple Account.
  3. Choose the most recent backup by date and size.
  4. Sign in again when asked to restore apps and purchases.
  5. Keep the iPhone on Wi-Fi and power until the progress bar finishes.
  6. Set a new passcode you can remember.

For a computer backup, open Finder on a Mac with macOS Catalina or later, or Apple Devices on Windows 10 or later, select the iPhone, click Restore Backup, choose the backup and click Restore. Without any backup, data on the iPhone cannot be recovered after the erase.

Restore iPhone data after passcode reset from the Transfer Your Apps & Data screen
Tap From iCloud Backup, sign in to your Apple Account and pick the most recent backup by date and size. (Image: Apple)

How to check the iPhone is unlocked and ready

  1. Lock the iPhone and unlock it with the new passcode.
  2. Open Settings > Face ID & Passcode (or Touch ID & Passcode) and confirm the passcode settings open with the new code.
  3. Check that Settings shows your name, which confirms the Apple Account is signed in.
  4. Open Photos and Messages to confirm the backup content is downloading.
  5. Make sure Find My is on again under Settings > your name.

What happens after too many wrong iPhone passcode attempts

Stage What you see What it means
Five incorrect attempts iPhone Unavailable screen Passcode Reset or Forgot Passcode? can appear if conditions are met
Lockout with network and Find My Security Lockout with Forgot Passcode? or Erase iPhone You can erase the iPhone without a computer
Ten failed attempts with Erase Data on iPhone erases itself Set up again and restore a backup
Ten failed attempts with Erase Data off iPhone must be restored on a computer Use recovery mode
After any erase with Find My on Activation Lock asks for the Apple Account Only the owner's Apple Account password reactivates it

Fix iPhone passcode reset problems

Forgot Passcode? or Erase iPhone does not appear

The iPhone is offline, Find My is off, or iOS is older than 15.2.

  1. Confirm the iPhone has an active cellular or Wi-Fi connection; the option needs one.
  2. Remember that Find My must have been turned on before the lockout; it cannot be turned on now.
  3. If the option still does not appear, use recovery mode with a computer.

Enter Previous Passcode is missing or the old passcode fails

More than 72 hours have passed since the change, or the old passcode was expired early.

  1. Tap Forgot Passcode? and choose Start iPhone Reset instead.
  2. Or restore the iPhone in recovery mode with a computer.

The iPhone exits recovery mode during the restore

The iOS download took more than 15 minutes.

  1. Let the download finish on the computer.
  2. Turn off the iPhone.
  3. Enter recovery mode again and choose Restore.

Computer-and-cable screen never appears

The wrong button for the model, or the buttons do not respond.

  1. Check the button table above for your model.
  2. Connect the cable to the computer first, then to the iPhone, and hold the button immediately.
  3. If it still fails, contact Apple to get service.

Asked for an Apple Account after the reset

Activation Lock is on because Find My was on.

  1. Enter the Apple Account and password used on the iPhone.
  2. If you forgot the password, reset your Apple Account password first.
  3. On a used iPhone, ask the previous owner to remove it from their account.

Locked out of iPhone passcode FAQ

How do I unlock my iPhone if I forgot my passcode?

Use Passcode Reset with your old passcode if you changed it in the last 72 hours on iOS 17 or later. Otherwise erase the iPhone from the Security Lockout screen or in recovery mode with a computer, then restore your backup.

Can I unlock a locked iPhone without losing data?

Only with Passcode Reset, which needs iOS 17 or later and a passcode changed within the last 72 hours. Every other route erases the iPhone, so your data comes back only from an iCloud or computer backup.

Can I reset my iPhone passcode through iCloud?

Yes, in effect. With iOS 15.2 or later, Find My on and a network connection, the lockout screen offers Forgot Passcode? or Erase iPhone. You confirm with your Apple Account password, and the iPhone erases itself.

Will I lose everything if I am locked out of my iPhone?

The erase deletes everything on the iPhone, but anything in an iCloud backup or a computer backup can be restored during setup. Photos and other content in iCloud also download again after you sign in.

How many wrong passcode attempts before an iPhone erases itself?

Ten, if Erase Data is turned on in Face ID & Passcode settings. If it is off, the iPhone must be restored on a computer after ten failed attempts. The iPhone Unavailable screen appears after five.

Can I use recovery mode without iTunes?

Yes. On a Mac with a recent macOS, recovery mode restores run in Finder. On a Windows PC, use the Apple Devices app from the Microsoft Store. Select the iPhone and choose Restore.

What if my new iPhone is locked with a passcode?

A used iPhone that shows a passcode Lock Screen has not been erased. Ask the seller to erase it and remove it from their Apple Account. Do not take ownership while it shows iPhone Locked to Owner.

What should I do if I found an iPhone locked with a passcode?

You cannot unlock it, and Activation Lock stops anyone but the owner from reactivating it. If the screen shows a Lost Mode message with a phone number, use it to contact the owner.

Can Apple unlock my iPhone passcode?

Without the passcode, the only route that keeps data is Passcode Reset; every other option erases the iPhone. If you have no computer and cannot borrow one, an Apple Store or Apple Authorized Service Provider can help with the restore.

Bottom line: best way to get back into a locked iPhone

Try Passcode Reset first, then Start iPhone Reset on the lockout screen, and use recovery mode with a computer only when neither appears. Passcode Reset is the only route that keeps your data, and the on-device reset avoids a computer; recovery mode always works but needs a Mac or PC and the longest time.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *