If you forgot your passcode
and are unable to unlock your iPhone,
you can erase it to remove the passcode lock
and then restore it from a backup later.
We'll show you how to erase your iPhone wirelessly
in iOS 15.2 or later.
If you're using iOS 15.1 or earlier,
or if you can't erase your iPhone wirelessly,
we'll also show you how to erase it using a computer.
To restore your device from a backup,
you'll need to have one already stored in iCloud
or on your computer.
First, let's see how to erase your iPhone wirelessly.
Before you start, you'll need to know your Apple ID and password,
and your iPhone must be connected to the internet
using Wi-Fi or your cellular data.
Let's get started.
If you've entered your passcode incorrectly too many times,
your device will be disabled,
and you'll see an option to erase your iPhone
in the bottom-right corner of the screen.
To do this, tap Erase iPhone.
This will erase all content and settings on your iPhone,
including the passcode.
If you have a backup saved in iCloud or on your computer,
you can restore your content when the process is complete.
To continue, tap Erase iPhone again,
and then enter your Apple ID password when prompted.
Then the process of erasing your iPhone will begin.
This might take a little while.
Once it's been erased, the Hello screen will appear,
and you can follow the steps to set up your iPhone again.
If you're using iOS 15.1 or earlier,
or can't erase your iPhone wirelessly,
you can erase it with Recovery Mode and a computer.
To use this option, you'll need a Mac or Windows computer
and a compatible cable.
Your iPhone will need to be charged,
and if it has Find My enabled, you'll need to make sure
you have your Apple ID and password ready.
First, you'll perform a few steps on your iPhone.
The steps will vary depending on which model of iPhone you have.
Once you've entered Recovery Mode,
you'll switch to your computer.
If you have an iPhone X or later,
a 2nd generation iPhone SE,
an iPhone 8, or an iPhone 8 Plus,
press and hold the side button and one of the volume buttons
until the Power Off slider appears.
Drag the slider to turn off your device.
Now press and hold the side button
and immediately connect your device to your computer
while holding the button.
Make sure to keep holding the side button
until the Recovery Mode screen appears.
This might take a moment.
If you have an iPhone 7, iPhone 7 Plus,
or a 7th generation iPod touch,
press and hold the side button or the top button
until the Power Off slider appears.
Then drag the slider to turn off your device.
Now press and hold the volume-down button
and immediately connect your device to your computer
while holding the button.
Make sure to keep holding the volume-down button
until the Recovery Mode screen appears.
This might take a moment.
If you have a 1st generation iPhone SE,
an iPhone 6s or earlier,
or a 6th generation iPod touch or earlier,
press and hold the side or top button
until the Power Off slider appears.
Next, drag the slider to turn off your device.
Now press and hold the Home button
and immediately connect your device to your computer
while holding the button.
Make sure to keep holding the Home button
until the Recovery Mode screen appears,
and then follow the onscreen prompts.
This might take a moment.
Now you'll complete the process using your computer.
If you have a Mac using macOS Catalina or later,
open the Finder.
If you're using macOS Mojave or earlier,
or if you're using a Windows computer, open iTunes.
When the option to Restore or Update your device appears,
click Restore.
This will erase all content and settings,
including the passcode.
If you have a backup saved to your computer or iCloud,
you can restore it after this process is done.
Click Restore and Update when you're ready.
Your computer will download and install
the latest version of iOS onto your iPhone.
If the download takes longer than 15 minutes,
your device will exit Recovery Mode.
To reenter Recovery Mode,
you'll need to repeat the iPhone steps
described in the previous section.
Be sure not to disconnect your device while it's restoring.
After the restore is completed, your device will restart.
If you still need help,
contact Apple Support to speak with an advisor
or to make an appointment at an Apple Store
or Apple-authorized service provider.
To learn more about your Apple devices,
subscribe to the Apple Support YouTube channel
or click another video to keep watching.
Some sequences in this video were shortened.
♪ Upbeat music playing ♪