• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • iPhone
  • Office
  • Google
  • Windows & Mac
  • Apps & Devices
  • WordPress
  • All guides
Home/iPhone/How to Factory Reset iPhone When Locked (iOS 27)
iPhone

How to Factory Reset iPhone When Locked (iOS 27)

By Matthew Burleigh · Updated October 29, 2026 · 13 min read

If you’re locked out of your iPhone, the quickest way to factory reset it needs nothing but the phone itself. On iOS 17 and later, including iOS 27, keep entering the wrong passcode until iPhone Unavailable appears, tap Forgot Passcode?, then Start iPhone Reset, and sign in with your Apple Account password to erase it. If that option doesn’t show up, erase the phone from another device in Find My, and if that isn’t possible either, restore it with a Mac or Windows PC in recovery mode. When the lock screen offers it, unlocking an iPhone passcode without a computer shows how to erase and set up the phone without a computer. A locked phone has limited options, and the article on deleting everything on an iPhone explains how to delete everything on an iPhone you can open.

All three routes erase everything on the iPhone. They work on every model that runs iOS 27, and the computer route also covers older iPhones that can’t get there. What comes back afterward depends on whether you have an iCloud or computer backup.

Before You Start: Two Passwords and One Quick Check

Two different secrets come up in this process, and mixing them up is the most common reason people get stuck:

  • The passcode is the 4 or 6 digit code (or custom code) you type on the Lock Screen. This is what you’ve forgotten.
  • The Apple Account password (formerly called the Apple ID password) is the password for the account the iPhone is signed in to. You’ll need it for every route below, either during the reset or when you set the phone up again.

You’ll also see the term Activation Lock. It’s an anti-theft feature that turns on automatically with Find My and ties the iPhone to your Apple Account, so a stranger can’t erase and reuse it. It has its own section further down.

Check this first: if you changed your passcode within the last 72 hours and the iPhone runs iOS 17 or later, you may be able to get back in with the old code and keep all your data. At the iPhone Unavailable screen, tap Forgot Passcode? > Enter Previous Passcode. The full walkthrough is in the article on unlocking an iPhone when you forgot the passcode. If that doesn’t apply, a reset is the only supported way back in.

One more thing to know up front: you can’t make a new backup of a locked iPhone. Only a backup you already have in iCloud or on a computer can be restored after the erase.

Which Route Fits Your Situation

Apple suggests trying these in order. Pick the first one whose conditions you meet.

Route Use it when What you need
Lock Screen reset You have only the locked iPhone iOS 15.2 or later, Find My already on, Wi-Fi or cellular connection, Apple Account password
Find My on another device or iCloud.com Forgot Passcode? doesn’t appear, or the phone is lost Find My turned on before the lockout, your Apple Account and password, another Apple device or any web browser
Recovery mode with a computer Neither of the above works, Find My was off, or the iPhone runs an older iOS A Mac or Windows PC, a cable that can charge your iPhone, internet, up to 60 minutes

If the phone works and you know the passcode, you don’t need any of this. Use Erase All Content and Settings instead, which is covered in the article on how to factory reset an iPhone on any model.

Reset a Locked iPhone From the Lock Screen

This route runs on the iPhone itself, so you don’t need a computer or a second device. It only works if Find My was already on and the phone is connected to Wi-Fi or cellular data. If the phone is on a known Wi-Fi network or has a SIM with data, it’s usually already connected even while locked.

Warning: the moment you tap Erase iPhone, everything on the phone is permanently deleted. Make sure you’ve tried the previous passcode check above if it applies.

On iOS 17 and later (including iOS 27)

  1. On the Lock Screen, keep entering a passcode until the screen changes to iPhone Unavailable. You may have to wait between attempts.
  2. Tap Forgot Passcode? near the bottom of the screen. If you don’t see it, the phone is offline or Find My is off; skip to the Find My or computer route.
  3. On the Security Lockout screen, tap Start iPhone Reset, then confirm.
  4. Enter your Apple Account password. This signs the iPhone out of your Apple Account before anything is erased.
  5. Tap Erase iPhone. If the phone uses an eSIM, you’ll be asked to choose between Keep eSIM and Erase Data and Delete eSIM and Erase Data. Keeping it is usually the right choice if you’re going to keep using this phone with the same carrier line.
  6. Wait while the iPhone erases and restarts. When it restarts, the setup screens begin.
  7. Follow the setup prompts, restore from a backup if you have one, and set a new passcode you’ll remember.

On iOS 15.2 through iOS 16

The conditions are the same, but the screen looks different. After several wrong passcodes, an Erase iPhone option appears on the Lock Screen instead of Forgot Passcode?. Tap it and follow the onscreen steps, which include entering your Apple Account password. If the phone uses an eSIM on these versions, contact your carrier first for a QR code so you can set the line up again after the erase.

Apple’s support article on resetting your iPhone passcode from the Lock Screen lists these requirements and both screen versions.

Erase It From Another Device With Find My

Choose this route when Forgot Passcode? never appears on the locked phone, when you don’t have the phone with you, or when the screen is damaged. It only works if Find My was turned on before you got locked out.

Warning: a remote erase deletes everything on the iPhone. (Apple says that for a device that had iOS 15 or later, you can still use Find My to locate it or play a sound on it after the erase.)

From the Find My app on another iPhone, iPad, or Mac

Use a device signed in to the same Apple Account, such as your iPad or Mac, or a family member’s device where you sign in with your own account.

  1. Open the Find My app and tap Devices.
  2. Tap the locked iPhone in the list. Its card opens with options for the device.
  3. Tap Erase (on some screens you may need to tap the more options button first), then tap Continue.
  4. Optionally add a phone number and message, then tap Erase.
  5. Enter your Apple Account password and tap Erase to confirm.

If the locked iPhone is online, it starts erasing right away. If it’s off or offline, Find My shows Erase Pending and the erase starts the next time the phone connects to Wi-Fi or cellular. You can tap Cancel Erase while it’s still pending.

From iCloud.com in any web browser

  1. On any computer or a borrowed phone, go to icloud.com/find and sign in with your Apple Account. If the locked iPhone is the device that would receive your two-factor code, Apple’s tip is to use the button at the bottom of the sign-in window to sign in to Find Devices without a code.
  2. In the list of devices, select the locked iPhone. If another device is already selected, choose All Devices to go back to the list.
  3. Select Erase This Device and follow the onscreen instructions.

An offline iPhone erases when it next comes online, and Stop Erase Request cancels it until then. After either Find My method, Activation Lock stays on, so keep your Apple Account password handy for setup.

Restore It With a Computer in Recovery Mode

This is the fallback that works even when Find My was off, the phone has no network connection, or it runs an iOS version older than 15.2. Recovery mode is a special startup state that lets a computer reinstall iOS on the iPhone. Restoring in recovery mode erases the phone and installs the latest iOS it supports.

What you need: a Mac or a Windows PC, a cable that can charge your iPhone, an internet connection, and up to 60 minutes. On a Mac you’ll use Finder. On Windows you’ll use the free Apple Devices app from the Microsoft Store. A friend’s or relative’s computer is fine for this.

First, find the button you’ll hold for your model:

iPhone model Button to hold while connecting
Any iPhone with Face ID (Apple’s page doesn’t list iPhone Duo separately; check it before you start) 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
  1. Turn the iPhone off. On a Face ID model, press and hold the side button and the volume down button until the power off slider appears. On a model with a Home button, press and hold the side or top button. Drag the slider and wait for the screen to go dark.
  2. Plug the cable into your computer, but not into the iPhone yet.
  3. Connect the cable to the iPhone and quickly press and hold the button from the table above. Don’t release it. Keep holding through the Apple logo, and let go only when you see an image of a computer and a cable on the iPhone screen.
  4. On a Mac, open a Finder window and select the iPhone under Locations in the sidebar and allow the accessory to connect if asked. On Windows, open the Apple Devices app, select the iPhone in the sidebar, choose Trust if prompted, then select General.
  5. When you’re offered Restore or Update, choose Restore, then confirm. Restore is the option that erases the phone, and with it the forgotten passcode.
  6. Wait while the computer downloads iOS and restores the phone. The download alone can take more than 15 minutes. If the iPhone leaves the recovery screen during the download, let the download finish, then turn the phone off and repeat step 3. Apple gives the same advice if the iPhone restarts during the process.
  7. When the Hello screen appears on the iPhone, disconnect it and set it up.

If you’ve never used recovery mode before, Apple’s guide on what to do if you forgot your iPhone passcode shows each button and screen. For more detail on resets when no password works, including what each route signs you out of, see the article on resetting an iPhone without a password.

No computer at all? An Apple Store or an Apple Authorized Service Provider can do the restore for you.

Activation Lock: The Lock a Reset Can’t Remove

Many people searching for a “locked iPhone” actually mean an iPhone that shows iPhone Locked to Owner or asks for an Apple Account after the reset. That’s Activation Lock, and it’s a separate lock from the passcode.

Here’s how it relates to each route:

  • Find My erase and recovery mode: Apple says Activation Lock stays on afterward. During setup, the iPhone asks for the Apple Account and password that were used on it.
  • Lock Screen reset: you enter your Apple Account password before the erase, which signs the iPhone out of your account. If the phone still asks for an Apple Account during setup, sign in with the same account and password.

Apple’s legitimate ways past Activation Lock are:

  1. Sign in on the iPhone with the Apple Account and password used to set it up. Apple also accepts the old device passcode on this screen, if you happen to remember it.
  2. Remove it from the web. The account owner signs in at icloud.com/find, selects the iPhone, and chooses Remove This Device. This is the route when you bought a used phone and the seller can’t be there in person: ask them to do it, then continue setup.
  3. Reset the Apple Account password if that’s also forgotten. Apple’s options include the Forgot password? link at sign-in, iforgot.apple.com in Safari (on a device with iOS 17 or later or a current Mac), the Apple Support app on a borrowed device (Support Tools > Reset Password > Help Someone Else), and account recovery, which can take several days or more.
  4. Ask Apple directly with an Activation Lock support request. You’ll need proof of purchase showing you own the device. The request form is linked from Apple’s page on how to remove Activation Lock.
  5. Contact your IT department if the iPhone belongs to a company or school. Devices managed by an organization can only be released by that organization.

If you’re buying a used iPhone and it shows Locked to Owner, don’t set it up until the seller has removed it. Software sold as an Activation Lock or passcode “remover” isn’t a supported route, and no app can remove Activation Lock without the owner’s credentials or Apple’s approval.

Confirm the Reset Worked and Get Your Data Back

A completed factory reset always ends on the Hello screen in several languages. If you see your old Lock Screen or wallpaper instead, the erase didn’t happen (see the troubleshooting section below).

From the Hello screen, the setup assistant walks you through language, Wi-Fi, and Face ID or Touch ID. Then you reach a screen asking how to transfer your apps and data. Your choices are:

  • Restore from an iCloud backup, if iCloud Backup was on before the lockout. Sign in with your Apple Account and pick the most recent backup.
  • Restore from a Mac or PC, if you backed up to a computer. Connect it and pick the backup in Finder or the Apple Devices app.
  • Set up as new, if you have no backup. Anything synced to iCloud (such as photos with iCloud Photos turned on, contacts, and notes) comes back when you sign in, and you can download your purchased apps again for free.

A reset can’t be undone. Data that was only on the phone and in no backup is gone. When setup asks for a new passcode, pick one you’ll remember, and consider writing it somewhere safe at home.

Locked Out After the Reset

The iPhone asks for an Apple Account you don’t recognize

This is Activation Lock from a previous owner or a family member’s account. Use the routes in the Activation Lock section: the owner signs in, or removes the phone at icloud.com/find, or you submit Apple’s support request with proof of purchase.

Your Apple Account password is rejected

Check you’re using the account the iPhone was signed in to. Many people have more than one. If you’ve forgotten it, use the Forgot password? link, go to iforgot.apple.com in Safari on a device with iOS 17 or later or a current Mac, or use the Apple Support app on a friend’s device, then try again.

The phone asks for the old passcode during setup

On the Activation Lock screen, Apple offers the device passcode as an alternative to your Apple Account password. If you don’t remember it, use your Apple Account and password instead.

Forgot Passcode? never appeared

The phone is offline or Find My was off. Use Find My from another device if it was on, or go straight to recovery mode with a computer.

Find My is stuck on Erase Pending

The locked iPhone hasn’t reconnected. Turn it on near a known Wi-Fi network or make sure its SIM has service. If it can’t get online, use recovery mode instead.

The computer doesn’t see the iPhone, or the recovery screen never appears

Turn the iPhone off again and repeat the connect-while-holding step, holding the button a little longer past the Apple logo. Try another cable that can charge the phone, or another USB port. On Windows, make sure the Apple Devices app is installed and updated. If the buttons don’t respond at all, the iPhone may need service from Apple.

The iPhone dropped out of recovery mode partway through

That happens when the download takes longer than the phone waits. Let the computer finish downloading, then turn the phone off and enter recovery mode again.

Locked iPhone Reset Questions

Can I factory reset a locked iPhone with just the buttons?

No. Button combinations only force restart the phone or put it into recovery mode, and recovery mode still needs a computer to finish the restore. The only reset that runs entirely on the phone is the Lock Screen route, which uses the touchscreen and an internet connection.

Does my phone number or carrier line survive the reset?

A physical SIM card isn’t touched by the erase, so your line works once setup finishes. With an eSIM, choose Keep eSIM and Erase Data on the Lock Screen route. After a Find My or computer erase, the eSIM may need to be set up again, so have your carrier’s contact details ready.

How long does resetting a locked iPhone take?

Apple says to allow up to 60 minutes for the computer route, and the iOS download alone can take more than 15 minutes on a slow connection. Apple doesn’t give a time for the Lock Screen and Find My routes, but keep the phone charged or plugged in either way so it doesn’t shut down partway through.

I found an iPhone. Can I reset it and keep it?

You can erase it with recovery mode, but Activation Lock will still ask for the owner’s Apple Account, so the phone can’t be set up. If the Lock Screen shows a message or phone number from the owner, contact them. Otherwise, hand it to the police or an Apple Store.

Is it safe to hand a locked iPhone to Apple for reset?

Yes. An Apple Store or Apple Authorized Service Provider can run the same recovery mode restore you’d do at home. They can’t skip Activation Lock for you, though: that still needs the owner’s Apple Account or an approved Activation Lock support request, so bring your proof of purchase if the phone is linked to an account you can’t sign in to.

Does resetting a locked iPhone delete my iCloud backup?

No. Erasing the phone deletes only what’s stored on the device itself. Your iCloud backups and anything synced to iCloud stay in your account, ready to restore during setup.

Your Next Move

Once the phone is back on the Hello screen, restore your most recent backup and set a passcode you’ll remember. Then make sure iCloud Backup and Find My are on, so a future lockout costs you nothing more than a short reset.

Matthew Burleigh
Matthew Burleigh

Matt has been working with WordPress and creating content using this powerful content management system for years. While he has written about many other tech topics, WordPress is one of his favorites.

You can read his full bio here.

Join Our Free Newsletter

iPhone & tech guides

You may opt out at any time.
Read our Privacy Policy

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Pinterest (Opens in new window) Pinterest

Related

More iPhone guides

  • How to See Someone’s Location on iPhone Messages
  • How to Set Different Wallpaper on Lock Screen and Home Screen iPhone
  • How to Remove a Hacker from My iPhone (iOS 27)
  • How to Turn Off Wi-Fi on the iPhone 15
  • How to Block No Caller ID Calls on iPhone
See all iPhone guides

Primary Sidebar

Join Our Free Newsletter

iPhone & tech guides

You may opt out at any time.
Read our Privacy Policy

Recent Posts

  • How to Put iPhone into Recovery Mode: When You Need It and What Happens
  • How to Change HEIC to JPG on iPhone (New and Existing Photos)
  • How to Delete Subscription History on iPhone (and What to Do Instead)
  • How to Turn Off Contact Sharing on iPhone: A Simple Guide
  • How to Change Photo Background on iPhone (Lift the Subject, Place It on Another Photo)

Site Info

  • Domain Name - Hostgator
  • Hosting - Cloudways
  • Theme Framework - Genesis
  • Child Theme - Smart Passive Income Pro
  • Site Speed - WP Rocket

Archives

  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • June 2024
  • May 2024
  • December 2023
  • November 2023
  • October 2023
  • November 2022
  • October 2022
  • May 2022
  • July 2020
  • September 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • July 2018
  • December 2016
  • November 2016

Categories

  • Apps & Devices
  • Comments
  • Genesis
  • Getting Started
  • Google
  • Hosting
  • iPhone
  • Jetpack
  • Microsoft Office
  • Navigation
  • Plugins
  • Settings
  • Sidebar
  • Themes
  • Windows & Mac
  • WordPress
  • Writing

Clear, step-by-step answers for iPhone, Office, Google, Windows, Mac and WordPress. Find your problem, follow the steps, get back to what you were doing.

Topics

  • iPhone
  • Microsoft Office
  • Google
  • Windows & Mac
  • Apps & Devices
  • WordPress
  • All guides

WordPress

  • Getting Started
  • Writing
  • Settings
  • Navigation
  • Jetpack
  • Themes

Company

  • Affiliate Disclosure
  • Privacy Policy
  • FAQ
  • About
  • Contact

© 2026 Answer Your Tech. Not affiliated with Apple, Microsoft, Google or WordPress. All trademarks belong to their owners.