How to Factory Reset Your iPhone (With or Without a Passcode)

Want to factory reset your iPhone? On any recent iPhone, go to Settings > General > Transfer or Reset iPhone > Erase All Content and Settings. That deletes everything on your iPhone and brings it back to…

On this page

9 sections
How to Factory Reset Your iPhone (With or Without a Passcode)

Want to factory reset your iPhone? On any recent iPhone, go to Settings > General > Transfer or Reset iPhone > Erase All Content and Settings. That deletes everything on your iPhone and brings it back to factory settings, like the day you unboxed it. Before you do it, back up your data, have your passcode and Apple Account password ready, and decide whether to keep or delete your eSIM. This guide shows you how to reset your iPhone to factory settings from Settings, with a computer and without your passcode, step by step.

Before you factory reset your iPhone

A factory reset can't be undone. Take five minutes to check these first:

  1. Back up your iPhone. Go to Settings > [your name] > iCloud > iCloud Backup and tap Back Up Now. You can also back up to a Mac with the Finder, or to a Windows PC with the Apple Devices app or iTunes (Apple: Back up iPhone).
  2. Unpair your Apple Watch if you have one.
  3. Have your passcode and Apple Account password ready. Your iPhone asks for them during the reset. When you erase your iPhone this way, Find My and Activation Lock turn off, so the next owner can use it.
  4. Decide on your eSIM. If you use an eSIM, your iPhone asks if you want to keep it or delete it (see below).
  5. Stay on Wi-Fi and plug in your iPhone, so the last backup can finish and nothing stops the reset halfway.

Selling, trading in or giving away your iPhone? Also take out your physical SIM card if you use one, and switch off iMessage if you're moving to an Android phone. Apple lists everything in its checklist (Apple: What to do before you sell or give away your iPhone). Keeping the SIM for your next phone? Here's how to clean a SIM card safely. Resetting an Android phone too? Read how to reset a phone on iPhone and Android.

Keep or delete your eSIM?

  • Keep eSIM and Erase Data: you'll keep using this iPhone and just want a fresh start.
  • Delete eSIM and Erase Data: you're selling or giving away your iPhone, or your number has already moved to another phone. Apple says to erase the eSIM in these cases (Apple: How to erase an eSIM).

If you delete your eSIM, you'll need to contact your carrier to get your plan back. Unlike a SIM card, you can't just take it out and put it in another phone, one of the downsides of eSIM. Want to keep it? Read how to reset your iPhone without losing your eSIM.

How to factory reset your iPhone from Settings

This is the easiest way, and you don't need a computer. These steps are for iOS 26 and iOS 27.

  1. Open the Settings app and tap General.
  2. Tap Transfer or Reset iPhone.
  3. Tap Erase All Content and Settings, then Continue.
  4. Choose to keep or delete your eSIM, if you have one.
  5. Enter your iPhone passcode.
  6. Wait for your iCloud backup to finish, then enter your Apple Account password.
  7. Wait while your iPhone erases. When the Hello screen appears, the reset is done.

Source: Apple: How to factory reset your iPhone. Apple says erasing deletes your photos, contacts, music, apps and the cards in Apple Pay. Your data stored in iCloud stays in iCloud.

Shipping an iPhone 18 Pro Max? Apple says you may need to turn on Prepare to Ship first, in the same Transfer or Reset iPhone menu (Apple: Sell, give away or trade in your iPhone).

How to factory reset your iPhone with a computer

Person holding a smartphone next to a laptop on a table

Use a Mac or Windows PC if your iPhone works but you'd rather reset it from a computer. A computer restore erases your iPhone and installs the latest iOS.

  1. Turn off Find My first: go to Settings > [your name] > Find My > Find My iPhone, turn it off and enter your Apple Account password. The Restore button won't work until you do.
  2. Connect your iPhone to your computer with a cable.
  3. On a Mac, open the Finder. On a Windows PC, open the Apple Devices app. On macOS Mojave or earlier, or a PC without the Apple Devices app, use iTunes.
  4. Select your iPhone in the sidebar. If asked, click Trust on the computer, tap Trust on your iPhone and enter your passcode.
  5. Click Restore iPhone and follow the steps on screen.
  6. When the Hello screen appears on your iPhone, the restore is done.

Good to know: Apple says restoring with a computer doesn't delete your eSIM. If you're selling your iPhone, erase the eSIM separately (Apple: Restore your iPhone to factory settings using a computer).

How to factory reset a locked iPhone without the passcode

Forgot your passcode, or see "iPhone Unavailable"? You can still reset your iPhone. Try these in order.

1. Use your old passcode (changed it in the last 72 hours)

On iOS 17 or later, if you changed your passcode less than 72 hours ago, tap Forgot Passcode? on the Lock Screen, then Enter Previous Passcode. You get back in without erasing anything (Apple: Passcode Reset).

2. Reset your iPhone from the Lock Screen

This works on iOS 17 or later without a computer. Your iPhone needs Wi-Fi or mobile data, and Find My must be turned on.

  1. Enter a wrong passcode until the iPhone Unavailable screen appears.
  2. Tap Forgot Passcode?, then Start iPhone Reset.
  3. Enter your Apple Account password.
  4. Tap Erase iPhone. You can choose to keep or delete your eSIM.

On iOS 15.2 or iOS 16, you see an Erase iPhone option instead. If you use an eSIM on these versions, ask your carrier for a new eSIM QR code before you start (Apple: Reset your iPhone without a computer).

3. Use recovery mode with a computer

If none of that works, put your iPhone in recovery mode. You need a Mac or PC, a cable and up to an hour.

  1. Turn off your iPhone. On an iPhone with Face ID, press and hold the side button and the volume down button until the slider appears. On an iPhone with a Home button, hold the side or top button.
  2. Connect the cable to your computer. Then connect it to your iPhone and right away press and hold the right button: the side button on iPhone 8 and later (including iPhone SE 2nd and 3rd generation), the volume down button on iPhone 7, or the Home button on iPhone 6s and earlier.
  3. Keep holding until you see a computer and a cable on your iPhone screen.
  4. Find your iPhone in the Finder or the Apple Devices app and choose Restore.

If the download takes more than 15 minutes and your iPhone leaves recovery mode, let the download finish and start again (Apple: Use a computer to reset your iPhone and passcode). After any of these resets, you still need your Apple Account password to set up the iPhone again. That's Activation Lock, and it protects your iPhone from thieves (Apple: Activation Lock).

How to erase your iPhone remotely with iCloud

Lost your iPhone, or already sent it away without erasing it? You can wipe it from any browser:

  1. Go to icloud.com/find and sign in with your Apple Account.
  2. Select your iPhone in the list of devices.
  3. Select Erase This Device and follow the steps.

If the iPhone is offline, it's erased the next time it connects. Activation Lock stays on after a remote erase (Apple: Erase a device in Find Devices). If you've sold or given the iPhone away, also remove it from your account in Find Devices, so the new owner can set it up. You can do the same in the Find My app on another Apple device.

Factory reset vs Reset All Settings

Searching for how to format your iPhone, or delete everything on it? That's a factory reset: Erase All Content and Settings. In the same menu, Reset gives you lighter options that keep your data:

  • Reset All Settings: puts your settings back to default. Your photos, apps and data stay.
  • Reset Network Settings: removes saved Wi-Fi networks and VPN settings. Useful for connection problems.
  • Delete All eSIMs: removes every eSIM from your iPhone.

Source: Apple: Reset iPhone settings to their defaults. Want to fix a connection problem with your eSIM? Try our eSIM not working fixes first. A full erase is rarely needed for that.

After the reset: set up your iPhone again

  • Keeping your iPhone? Follow the steps on the Hello screen and choose to restore from your iCloud or computer backup, or set it up as new.
  • Moving to a new iPhone? Use Quick Start to move your data and phone number. Here's how to do a quick transfer on iPhone.
  • Selling or giving it away? Leave it on the Hello screen. Apple says a used iPhone is ready for its new owner when they see the Hello screen and aren't asked for your Apple Account.
  • Check your lines. Go to Settings > Cellular (Mobile Service in some countries). If you kept your eSIM, it's listed there. If it's gone, ask your carrier for a new one.
  • Turn your settings back on, like Find My and location sharing with family. Here's how to share your location on iPhone.

Resetting before a trip? Add a travel eSIM

Young couple sitting on the floor of an airport terminal with their suitcases, looking at a smartphone

A fresh iPhone is a good moment to get ready for your next trip. A travel eSIM works next to your own number: you keep your line for calls and texts, and use the eSIM for mobile data abroad.

  • Erased a SimOptions eSIM by mistake? Find the QR code in your order email. Depending on the eSIM you bought, you can install it again from the same code (SimOptions FAQ). If it doesn't work, contact our support team with your order details.
  • Buying a new one? Install it on Wi-Fi shortly before you leave. The QR code arrives by email within seconds, and the validity starts when you first connect in the plan's region.

Flying to Europe, the USA or Asia? These data-only plans install from a QR code, so you can set one up at home right after your reset.

Europe, USA and Asia plans shown · data-only eSIMs, no phone number · Find the eSIM for your destination

FAQs

How do I factory reset my iPhone?

Go to Settings > General > Transfer or Reset iPhone > Erase All Content and Settings, tap Continue and follow the steps. Back up your iPhone first.

How do I factory reset my iPhone with buttons?

You can't erase an iPhone with buttons alone. The buttons put your iPhone in recovery mode, and then you restore it with a Mac or PC (see the steps above). Without a computer, use Forgot Passcode? on the Lock Screen.

How do I factory reset a locked iPhone?

On iOS 17 or later, enter a wrong passcode until you see iPhone Unavailable, tap Forgot Passcode? and Start iPhone Reset. Otherwise, use recovery mode with a computer. Either way, you'll need your Apple Account password to set it up again.

Does a factory reset delete everything on my iPhone?

Yes. Your apps, photos, messages, settings and Apple Pay cards are erased from the iPhone. What's stored in iCloud stays in iCloud, and you can restore a backup afterwards.

Does a factory reset remove my eSIM?

Only if you choose to. Erase All Content and Settings asks you to keep or delete your eSIM. A restore with a computer doesn't delete it.

Do I need to take out my SIM card before I sell my iPhone?

Yes, take out your physical SIM card. It's linked to your phone number, not to the iPhone. If you use an eSIM, choose to delete it when you erase your iPhone.

Can I undo a factory reset?

No. You can only bring your data back from a backup you made before the reset.

Do I need Wi-Fi to factory reset my iPhone?

Stay on Wi-Fi to be safe. Your iPhone finishes its iCloud backup before it erases, and you need internet to set it up again. Resetting from the Lock Screen without your passcode needs Wi-Fi or mobile data.

Even simpler with the SimOptions app!

Buy, install, track and top up your eSIM with ease

Download on the App StoreGet it on Google Play

Travelling with someone?

Send this guide to your travel group

So everyone picks the right eSIM before the flight.

Share this guide

How to Factory Reset Your iPhone (With or Without a Passcode)