Techie BullTECHIE BULLlet the bull fix it.
iPhone

How to Factory Reset a Locked iPhone (Forgot Passcode)

Mkpoikana Otu
Mkpoikana Otu
November 10, 2026 · 13 min read

If you need to know how to factory reset a locked iPhone, the good news is that Apple built three official ways to do it, and on a recent iPhone you might not even need a computer. The bad news is the same for all three: a reset erases the phone. Whatever wasn't in a backup is gone once you start.

There's one more thing worth knowing before you begin. Every method here ends at the same wall, which is Activation Lock. After the wipe, the iPhone asks for the Apple Account and password it was signed in with. That's what stops a stolen phone being wiped and resold, and it's why these steps only really help the phone's owner.

Quick answer: Keep entering the passcode until the iPhone Unavailable screen appears, then tap Forgot Passcode? in the bottom corner. On iOS 17 or later, try Enter Previous Passcode first if you changed it in the last 72 hours. Otherwise tap Start iPhone Reset, type your Apple Account password, and tap Erase iPhone. If that button isn't there, put the iPhone in recovery mode, connect it to a Mac or PC, and choose Restore.

Key takeaways:

  • On iOS 17 or later, a passcode changed in the last 72 hours can still unlock the phone through Enter Previous Passcode, with no erase at all.
  • The on-phone reset needs iOS 15.2 or later, Find My turned on, a Wi-Fi or cellular connection, and your Apple Account password.
  • Recovery mode on a Mac or Windows PC works on any iPhone, but it takes up to an hour and always erases.
  • After any reset, Activation Lock asks for the original Apple Account and password before the phone can be used again.
  • You can restore from an iCloud or computer backup during setup, so your data is only lost if there was no backup.

Prefer an interactive walkthrough? Try our Locked iPhone Reset Troubleshooter →

Related reading: How to Block Spam Calls on iPhone (iOS 26 Guide) · How to Sync iPhone and iPad (Photos, Messages, Calls)

Which Reset Method Should You Use?

Three cards comparing Enter Previous Passcode, Erase iPhone from the lock screen, and recovery mode on a computer for a locked iPhone

Method Erases the phone? Needs Best for
Enter Previous Passcode No iOS 17 or later, passcode changed in the last 72 hours You just changed the code and forgot the new one
Forgot Passcode? > Erase iPhone Yes iOS 15.2 or later, Find My on, Wi-Fi or cellular, Apple Account password Most locked iPhones from the last few years
Find Devices on iCloud.com Yes Find My on, phone online, Apple Account password Phone is somewhere else, or the button is missing
Recovery mode on a Mac or PC Yes A computer, a cable, internet, up to 60 minutes Older iOS, no connection, or nothing else worked

Apple's own order is the same as the table: try the previous passcode first, then the reset without a computer, then the computer restore. I'd follow it. The computer route is the most reliable, but it's also the slowest, and there's no point spending an hour on it if the lock screen can do the job in five minutes.

Why You Can Reset a Locked iPhone at All

The passcode protects the data on the phone. It doesn't stop the phone being wiped, because wiping destroys that data anyway. What Apple protects instead is the phone's ability to be used afterwards. That's Activation Lock, and it switches on automatically whenever Find My is turned on.

So a reset gets you a clean, unlocked iPhone, but only if you can sign in with the Apple Account that was on it. If you bought a phone second-hand and it's still tied to someone else's account, none of these methods will get you past setup. The seller has to remove it from their account.

Before You Start: Three Things to Check

Find your Apple Account password. You'll need it for the on-phone reset, for iCloud.com, and again during setup after any reset. If you've forgotten it, reset it first at Apple's account recovery page from another device. Doing this while the phone still works is far easier than doing it afterwards.

Check whether you have a backup. On another Apple device or at icloud.com, you can see whether iCloud Backup has been running. If you used to back up to a Mac or PC, that backup is still on the computer. Without a backup, photos and messages that weren't syncing to iCloud won't come back.

Charge the phone. A recovery-mode restore can take up to an hour, and a phone that dies halfway through just means starting again.

Method 1: Use Your Previous Passcode (iOS 17 or Later)

This isn't a reset, but it belongs at the top because it saves you a wipe. Apple calls it Passcode Reset. When you change your passcode on iOS 17 or later, the old one keeps working for 72 hours.

Step 1: Get to the iPhone Unavailable Screen

Enter the wrong passcode five times. The iPhone Unavailable screen appears.

Step 2: Tap Forgot Passcode?

It's in the bottom corner of the screen.

Step 3: Tap Enter Previous Passcode

Type the passcode you used before the change, then follow the prompts to set a new one. Apple says you'll be asked to change the passcode again straight away, so pick one you'll actually remember this time.

If you don't see Enter Previous Passcode, either the 72 hours have passed or the phone is on an older iOS. Move on to Method 2.

Method 2: Erase From the Lock Screen (Forgot Passcode?)

iPhone Security Lockout screen with the Start iPhone Reset button highlighted after tapping Forgot Passcode

This is the method I'd expect most people to use. It needs no computer, and on a decent connection it's done in minutes.

Apple lists four requirements: iOS 15.2 or later, Find My turned on before you got locked out, an active Wi-Fi or cellular connection, and your Apple Account and password. If the phone isn't connected, the Forgot Passcode? button simply doesn't appear. A SIM with data is enough, and a phone that previously joined your home Wi-Fi will usually reconnect on its own.

Step 1: Keep Entering the Passcode

From the Lock Screen, keep trying until the iPhone Unavailable screen appears.

Step 2: Tap Forgot Passcode?

Tap the button in the bottom corner. On iOS 15.2 and iOS 16, you'll see Erase iPhone in that spot instead. Tap it and skip to Step 4.

Step 3: Tap Start iPhone Reset

You'll land on the Security Lockout screen. Tap Start iPhone Reset to confirm.

Step 4: Enter Your Apple Account Password

This signs the phone out of your Apple Account. It's the step that proves you own the phone.

Step 5: Tap Erase iPhone

Tap Erase iPhone to permanently delete all your data and settings. If the phone uses an eSIM, iOS 17 or later asks whether to keep it or delete it. Keep it if you're setting the same phone back up, so you don't have to call your carrier.

Step 6: Set the Phone Up Again

The iPhone restarts to the Hello screen. Follow setup, restore from a backup if you have one, and set a new passcode.

Method 3: Erase Remotely With iCloud.com

iCloud.com Find Devices page in a web browser with a locked iPhone selected and Erase This Device highlighted

This does the same job as Method 2 from any computer or another phone. It's handy when the Forgot Passcode? button won't appear for some reason but the phone is still online, or when you'd simply rather do it from a bigger screen.

Step 1: Sign In to Find Devices

Go to icloud.com/find and sign in with your Apple Account. Apple notes you can select the Find Devices button at the bottom of the sign-in window to get in without a two-factor code, which matters when the locked iPhone is the device that would normally receive that code.

Step 2: Select the iPhone

Pick it from the device list. If a different device is already showing, select All Devices to go back to the list.

Step 3: Select Erase This Device

Follow the onscreen instructions. You may be asked for a phone number or message, which will show on the iPhone's Lock Screen.

If the phone is online, the erase starts right away. If it's off or offline, it starts the next time the phone connects. Apple also sends a confirmation email to your Apple Account address. Changed your mind? Select Stop Erase Request and enter your password.

Method 4: Restore in Recovery Mode on a Mac or PC

Recovery mode button for each iPhone model next to a Mac Finder dialog with the Restore option highlighted

This is the fallback that works on every iPhone, connected or not, on any iOS. Apple says to allow up to 60 minutes, and you need a Mac or Windows PC, a cable that can charge the phone, and an internet connection on the computer. If you have no computer at all, Apple's advice is to go to an Apple Store or an Apple Authorized Service Provider.

Step 1: Turn the iPhone Off

On a Face ID iPhone, press and hold the side button and the Volume down button until the power off slider appears, then drag it. On an iPhone with a Home button, hold the side or top button until the slider appears.

Step 2: Connect It While Holding the Right Button

Plug the cable into the computer first. Then, holding the correct button for your model, plug the other end into the iPhone and keep holding. Don't let go when the Apple logo appears. Keep holding until you see an image of a computer and a cable.

iPhone model Button to hold
Face ID models, iPhone 8, 8 Plus, SE (2nd and 3rd gen) Side button
iPhone 7 and 7 Plus Volume down button
iPhone 6s and earlier, SE (1st gen) Home button

Getting this step wrong is the most common snag. If the phone boots to the lock screen instead, unplug it, turn it off, and try again, holding the button a little earlier. If the buttons don't respond at all, Apple says the phone may need service.

Step 3: Find the iPhone on the Computer

On a Mac, open a Finder window and select the iPhone in the sidebar under Locations. On a Windows PC, open the Apple Devices app, select the iPhone in the sidebar, select Trust if it asks, then select General.

Step 4: Choose Restore

When you're offered Restore or Update, select Restore and follow the prompts. Update keeps your data but won't remove the passcode, so it's no help here.

Step 5: Wait Out the Download

The computer downloads iOS before restoring. Apple warns this can take more than 15 minutes, and the iPhone may drop out of recovery mode while it waits. On a Mac, if the phone restarts during the download, turn it off and start recovery mode again. On Windows, let the download finish first, then turn the iPhone off and start recovery mode again.

When it's done, the Hello screen appears. Disconnect the phone and set it up.

What Happens After the Reset

Expect the Activation Lock screen during setup. Enter the Apple Account and password that were on the phone. Apple's Activation Lock page is clear that this stays on even after a remote erase, as long as Find My was on.

Then restore. During setup you can choose an iCloud backup or a Mac or PC backup. If there's no backup, you'll start fresh, though anything that was syncing to iCloud (Photos, Contacts, Notes, if those were switched on) will come back once you sign in. Settings don't, though, so if you start fresh, redo things like Silence Unknown Callers; blocking spam calls on iPhone walks through the full set.

Still Not Working?

If recovery mode won't start, the computer doesn't see the phone, or Activation Lock is asking for an account you can't sign in to, contact Apple Support. Apple's own guides are worth having open: reset without a computer, reset with a computer, use your previous passcode, and Activation Lock. For a second-hand phone still locked to the seller's account, the seller is the only one who can release it.

Frequently Asked Questions

Can I factory reset a locked iPhone without a computer?

Yes, if the phone runs iOS 15.2 or later, Find My was on, and it's connected to Wi-Fi or cellular. Tap Forgot Passcode? (or Erase iPhone on iOS 15.2 and 16) on the iPhone Unavailable screen. You can also erase it from icloud.com/find on another device.

Will resetting a locked iPhone delete everything?

Yes. Every reset method erases all data and settings. You get it back only by restoring a backup during setup, plus whatever was already syncing to iCloud.

Why don't I see the Forgot Passcode? option?

Apple says it only appears when the phone has an active cellular or Wi-Fi connection and Find My is turned on. It also needs iOS 15.2 or later. If any of those are missing, use recovery mode on a computer.

Can I factory reset a locked iPhone without the Apple Account password?

You can erase it with recovery mode without the password, but you can't use it afterwards. Activation Lock asks for the Apple Account and password during setup. Reset the password through Apple's account recovery first.

How long does a recovery mode restore take?

Apple says to allow up to 60 minutes. The iOS download alone can run past 15 minutes, which is why the phone sometimes drops out of recovery mode and needs putting back in.

Does Enter Previous Passcode erase my iPhone?

No. It unlocks the phone with the passcode you used before the change, as long as you changed it within the last 72 hours on iOS 17 or later. Then it asks you to set a new passcode.

Can I reset a second-hand iPhone that's locked to someone else?

You can wipe it, but it will stop at Activation Lock asking for the previous owner's account. Only they can remove the phone from their Apple Account.

Quick Summary

Start with the cheapest fix: on iOS 17 or later, tap Forgot Passcode? and try Enter Previous Passcode if you changed the code in the last 72 hours. If that's not an option, tap Start iPhone Reset, enter your Apple Account password, and tap Erase iPhone, or erase it from icloud.com/find. If the phone is offline, older, or the button just isn't there, use recovery mode on a Mac or PC and choose Restore. Whichever route you take, have your Apple Account password ready for Activation Lock, and restore your backup during setup.

Related Articles

How to Block Spam Calls on iPhone (iOS 26 Guide) thumbnail
iPhone

How to Block Spam Calls on iPhone (iOS 26 Guide)

How to block spam calls on iPhone: screen or silence unknown callers, turn on Call Filtering, block single numbers, and add your carrier's free spam blocker.

November 16, 202611 min read