How to Factory Reset iPhone: Safe Steps, Even Without Passcode
How to factory reset iPhone the safe way: back up, sign out of your Apple Account, turn off Activation Lock, erase, and what to do if you forgot the passcode.
In this article
Quick answer
To factory reset iPhone safely, do three things in order:
- Back up to iCloud or a computer.
- Sign out of your Apple Account, which also turns off Find My and Activation Lock.
- Erase: open Settings > General > Transfer or Reset iPhone and tap Erase All Content and Settings.
If you forgot your passcode, skip to the forgotten-passcode section below. The steps below follow Apple's current support pages for iOS 27, and we point out where iOS 26 or older versions differ.
A factory reset deletes everything stored on the phone: photos, messages, apps and settings. It can't be undone, so don't skip the backup.
Before you reset: the 6-point checklist
Most reset regrets come from rushing this part. Work through it even if you're only resetting to fix a problem.
| Step | Why it matters | Where |
|---|---|---|
| 1. Back up | Erasing is permanent | Settings > [your name] > iCloud > iCloud Backup |
| 2. Unpair Apple Watch | Saves a fresh Watch backup and frees the Watch | Watch app on iPhone |
| 3. Note your Apple Account password | You'll need it to sign out and turn off Find My | Settings > [your name] |
| 4. Sign out of Apple Account | Turns off Find My and Activation Lock | Settings > [your name] > Sign Out |
| 5. Decide on the eSIM | Keep it if you keep the phone, erase it if you sell | Asked during erase |
| 6. Cancel or move AppleCare | It's tied to the device | Your AppleCare plan, if you have one |
1. Back up your iPhone
The fastest route is iCloud:
- Connect to Wi-Fi.
- Open Settings, tap your name, then iCloud > iCloud Backup.
- Tap Back Up Now and wait until the "last successful backup" time updates.
Prefer a computer, or short on iCloud space? Our full guide on how to back up iPhone covers Mac and Windows, plus encrypted backups that keep your saved passwords and Health data.
2. Unpair your Apple Watch
If an Apple Watch is paired to this iPhone, unpair it in the Watch app first. Apple lists this as a separate step before you erase.
3. Sign out of your Apple Account
Signing out is what removes Activation Lock. Activation Lock is part of Find My: it links the phone to your Apple Account on Apple's servers, so nobody can erase or reactivate it without your password. If you sell a phone with Activation Lock still on, the next owner sees an "iPhone Locked to Owner" screen and can't use it.
iOS 26 and iOS 27:
- Open Settings and tap [your name].
- Scroll down and tap Sign Out.
- Choose Erase this iPhone or Sign Out But Don't Erase. If asked which account, tap Sign out of iCloud and Store.
iOS 18 or earlier: Settings > [your name] > Sign Out, enter your Apple Account password, then tap Turn Off.
4. Switching to Android? Deregister iMessage
If your next phone isn't an iPhone, deregister iMessage so texts from iPhone friends don't vanish. Thinking of switching? See our iPhone vs Android comparison first.
How to factory reset iPhone from Settings
This is the normal method when you know your passcode. The path is the same in iOS 26 and iOS 27.
- Open Settings > General.
- Scroll to the bottom and tap Transfer or Reset iPhone.
- Tap Erase All Content and Settings.
- Enter your iPhone passcode (or Screen Time passcode, if asked).
- If you're still signed in, enter your Apple Account password to turn off Find My and Activation Lock.
- If you use an eSIM, choose whether to keep it or erase it. Selling or giving the phone away? Erase the eSIM too.
- Tap Erase iPhone to confirm.
The phone restarts and shows the Hello screen when it's done. If you're keeping it, set it up and choose to restore from your iCloud backup (or from your Mac or PC). If you're passing it on, stop at the Hello screen.
Don't confuse it with Reset. The Reset menu on the same screen (Reset Network Settings, Reset All Settings and so on) changes settings but doesn't erase your data. Only Erase All Content and Settings is a true factory reset.
Forgot your passcode? Reset from the lock screen
You can still erase your iPhone if you can't unlock it. You'll lose what's on the phone, but you can restore a backup afterward.
First, try your old passcode (iOS 17 and later)
If you changed your passcode in the last 72 hours, Apple's Passcode Reset lets you use the previous one. Tap Forgot Passcode? on the lock screen, choose the option to enter your previous passcode, then set a new one. No data is erased.
Reset without a computer
Apple says you need iOS 15.2 or later, Find My turned on beforehand, a cellular or Wi-Fi connection, and your Apple Account password.
On iOS 17 or later:
- On the lock screen, keep entering a passcode until you see iPhone Unavailable.
- Tap Forgot Passcode? (it only appears when the phone has a network connection).
- On the Security Lockout screen, tap Start iPhone Reset.
- Enter your Apple Account password to sign out.
- Tap Erase iPhone. With an eSIM, you can choose to keep or delete it.
- After the restart, set the phone up again and restore from your backup.
On older versions, the Unavailable screen shows an Erase iPhone option instead.
Reset with a computer (recovery mode)
Use this if the lock-screen option doesn't appear. You need a Mac or Windows PC, a cable that fits your iPhone, an internet connection and up to an hour.
- Turn the iPhone off. On Face ID models, hold the side button and a volume button until the power-off slider appears, then drag it.
- Connect the cable to your computer, but not the phone yet.
- Hold the right button while you plug in the phone, and keep holding through the Apple logo until you see a computer-and-cable image:
- iPhone with Face ID, iPhone 8 and 8 Plus, iPhone SE (2nd and 3rd gen): side button
- iPhone 7 and 7 Plus: volume down
- iPhone 6s and earlier, iPhone SE (1st gen): Home button
- On a Mac, open Finder and select your iPhone under Locations. On Windows, open the Apple Devices app and select your iPhone.
- Choose Restore (not Update).
- If the download takes longer than 15 minutes and the phone leaves recovery mode, turn it off and repeat from step 1.
After a computer restore, Activation Lock is still on. During setup you'll need the Apple Account and password that were on the phone.
Selling a phone you no longer have?
If you already handed the phone over without erasing it, Apple suggests:
- Ask the new owner to erase it with the steps above.
- Erase it remotely in Find Devices on iCloud.com, then remove it from your account.
- Remove it from your trusted devices list and change your Apple Account password.
- Remove cards from Wallet if you used Apple Pay.
Troubleshooting
"Forgot Passcode?" doesn't appear. The phone needs Wi-Fi or cellular, Find My must have been on, and it needs iOS 17 or later (iOS 15.2 to 16 show an Erase iPhone option instead). Otherwise use recovery mode.
The computer doesn't see my iPhone. Try a different cable or port. On Windows, make sure the Apple Devices app is installed and up to date.
Erase is asking for a password I don't remember. That's your Apple Account password, not the phone passcode. Reset it at iforgot.apple.com before you continue.
I bought a used iPhone that says "iPhone Locked to Owner." That's Activation Lock. Only the previous owner can remove it from their account, so contact the seller.
Setup is stuck on restoring. Keep the phone on Wi-Fi and charging. Large iCloud backups can take hours to bring back every app and photo.
Related reading
Reset done because the phone was full? Next time, try our guide to freeing up space on iPhone first. And when you set up again, consider switching to passkeys so there are fewer passwords to remember.
Frequently asked questions
Does a factory reset remove my Apple Account and Activation Lock?
How do I factory reset my iPhone if I forgot the passcode?
Will a factory reset delete my photos in iCloud?
How long does it take to factory reset an iPhone?
Should I remove my SIM or eSIM before resetting?
Sources
- Apple Support: What to do before you sell, give away, or trade in your iPhone or iPad
- Apple Support: About Activation Lock on iPhone and iPad
- Apple Support: If you forgot your iPhone passcode, reset your device without a computer
- Apple Support: Use a computer to reset your iPhone and passcode
- Apple Support: Temporarily use your old passcode when you forget your new passcode
- Apple Support: How to back up your iPhone with iCloud
Spotted an error or something out of date? Tell us — we update articles when products and software change.


