If you've forgotten the passcode for your iPhone or iPad, you can erase and reset or restore the device using your Apple ID and password. This article explains how.

ios 13 iphone ipad duo
‌iPhone‌ passcodes are usually six digits long, but they can still be forgotten, especially if the device hasn't been used for a while. If you find yourself in this predicament, you have the option to erase and reset it, after which you can restore the contents from a backup.

If you enter the wrong passcode several times on an ‌iPhone‌ running an iOS version earlier than iOS 15.2, your ‌iPhone‌ will disable itself for a time and you'll need to connect it to a computer and restore it from a backup.

If the ‌iPhone‌ is running iOS 15.2 or later, you won't need to connect it to a Mac or PC to reset it. Instead, you'll get an option to erase it when it's in Security Lockout mode, and you'll be able to restore from an iCloud backup.

The series of steps below outline the actions you need to take in both cases.

How to Reset a Locked iPhone Running iOS 15.2

The following steps assume your ‌iPhone‌ or ‌iPad‌ is running iOS 15.2 or iPadOS 15.2 or later, and is connected to a cellular or Wi-Fi network. Note that if you restart your device when you see "Security Lockout" on the Lock Screen, you won't be able to reconnect to a Wi-Fi network until your device is unlocked.

  1. From your device's Lock Screen, try entering your passcode several times until it asks you to try again later. When you can, repeat this action until you see the Erase ‌iPhone‌/‌iPad‌ option in the bottom corner of the screen.
  2. Tap Erase iPhone/iPad, then tap Erase iPhone/iPad again to confirm.
    Lock Screen

  3. Enter your ‌Apple ID‌ password to sign out of your Apple account on the device.
  4. Tap Erase iPhone/iPad once again to permanently delete all of your data and settings.
  5. When the iOS device restarts, follow the onscreen instructions to set it up again, restore your data and settings from a backup, and set a new passcode.

How to Restore a Locked iPhone Running iOS 15.1 or Earlier

  1. First, put your ‌iPhone‌ into DFU recovery mode.
  2. Next, connect it to a PC or Mac using a Lightning cable.
  3. Select your ‌iPhone‌ in the Finder sidebar on Mac, or in iTunes on the PC that it's connected to.
  4. Choose Restore when you see the option to Restore or Update. If the download takes more than 15 minutes and your device exits the recovery mode screen, let the download finish, then turn off your ‌iPhone‌ and start again.
    recovery mode iphone finder

  5. Wait for the process to complete.
  6. Disconnect your ‌iPhone‌, then turn it on and set it up.

If you're planning on trading in an old ‌iPhone‌ for a new one, there are some steps you'll want to take beforehand to ensure it's de-linked from your accessories and accounts and that everything on it is erased.

Related Roundups: iOS 15, iPadOS 15
Related Forum: iOS 15

Related Stories

iOS 15 banner public beta red

How to Install the iOS 15 Public Beta

Wednesday June 30, 2021 11:11 am PDT by
After promising to release iOS and iPadOS 15 to the public in July, Apple today seeded new iOS and iPadOS 15 beta updates to its public beta testing group, giving them the opportunity to try out the new software ahead of its fall launch. Signing up to get the iOS and iPadOS 15 beta is super easy, and can be done by enrolling an iPhone or iPad in Apple's free Apple Beta Software Program....
ipad kids playing

How to Limit What a Toddler Can Do When You Hand Over Your iPhone or iPad

Monday December 20, 2021 3:58 am PST by
If you've ever handed your iPhone or iPad to a baby or toddler to entertain them while you do something else, you'll probably know just how easily their little fingers can navigate into all manner of screens and settings they shouldn't be messing with. Fortunately, Apple includes a feature in iOS that allows you to keep your device locked into a single app and control which features are...
MAsk On Face ID iOS 15

iOS 15.4: How to Set Up Face ID With a Mask

Friday January 28, 2022 10:46 am PST by
In iOS 15.4, currently in beta, Apple has added a handy new feature that allows you to unlock your iPhone with Face ID and authenticate Apple Pay payments even when you're wearing a mask. In previous versions of iOS going back to iOS 14.5, it is possible to unlock your iPhone while wearing a mask, but only if you're also wearing an Apple Watch as an extra layer of security. The new option...
image 40

How to Restore Apple Watch Using Your iPhone

Thursday March 17, 2022 3:38 pm PDT by
Following the release of watchOS 8.5 for Apple Watch and iOS 15.4, you can now restore an Apple Watch that has a problem using a nearby iPhone. Before the updates were released, some Apple Watch models needing to be restored had to be mailed to an Apple Repair Center. In many cases, however, this is no longer a requirement thanks to the latest software updates, and you can restore a...
ios 13 iphone ipad duo

How to Erase Your iPhone or iPad

Thursday April 8, 2021 4:28 pm PDT by
Erasing your iPhone or iPad is a good idea when it comes to selling the device, giving it away, or taking it to a store for repairs. It's also one way to start afresh if your device's storage is nearing full capacity, so it's worth knowing how it's done. Before you erase anything though, you should back up your device, just in case. You can back up your data to iCloud, but we'd advise you...
watchOS 8 on Apple Watch feature

How to Authorize Apple TV Purchases on Apple Watch

Tuesday March 22, 2022 10:42 am PDT by
Following the release of watchOS 8.5 for Apple Watch and tvOS 15.4 for Apple TV, it's now possible to confirm Apple TV purchases from your wrist. This new method of verifying content purchases works for both one-time purchases like movies as well as in-app purchases on Apple TV. The following steps show how it works. Update your Apple TV to tvOS 15.4 (Settings -> System -> Software...
passwords system preferences

macOS 12.3: How to Add Notes to iCloud Keychain Entries

Tuesday February 8, 2022 3:07 pm PST by
In macOS Monterey 12.3, currently in beta, Apple has added the ability for users to add notes to account entries in iCloud Keychain. This article explains how it's done. Slowly but surely with each iteration of macOS, Apple has been improving ‌iCloud‌ Keychain to put it on equal footing with rival third-party password managers such as 1Password. And in macOS 12.3, it continues that...
shortcuts automation

iOS 15.4: How to Turn Off Notifications for Personal Automations in Shortcuts

Monday February 7, 2022 1:01 pm PST by
Apple's Shortcuts app is a great part of iOS because it includes tools that allow you to automate almost any action you can think of. But there is one aspect of it that has often annoyed users, and that's the lack of a setting that turns off notifications. Whenever Shortcuts runs an automation (let's say, disable rotation lock when a particular app is opened) it does so in the background....

Popular Stories

top stories 2jul2022

Top Stories: M2 MacBook Air Release Date, New HomePod Rumor, and More

Saturday July 2, 2022 6:00 am PDT by
The M2 MacBook Pro has started making its way into customers' hands and we're learning more about how it performs in a variety of situations, but all eyes are really on the upcoming M2 MacBook Air which has seen a complete redesign and should be arriving in a couple of weeks. Other top stories this week included a host of product rumors including additional M2 and even M3 Macs, an updated...
Mac Studio IO

Apple Begins Selling Refurbished Mac Studio Models

Thursday June 30, 2022 7:42 pm PDT by
Apple today began selling refurbished Mac Studio models for the first time in the United States, Canada, and select European countries, such as Belgium, Germany, Ireland, Spain, Switzerland, the Netherlands, and the United Kingdom. In the United States, two refurbished Mac Studio configurations are currently available, including one with the M1 Max chip (10-core CPU and 24-core GPU) for...
airpods pro 2 1

AirPods Pro 2 No Longer Expected to Feature Built-In Heart Rate or Body Temperature Sensor

Sunday July 3, 2022 8:07 pm PDT by
While past rumors have indicated the upcoming second-generation AirPods Pro will feature a built-in heart rate and body temperature sensor, Bloomberg's Mark Gurman has cast doubt on those rumors turning out to be true, saying instead such a feature is unlikely to come anytime soon. "Over the past few months, there have been rumors about this year's model gaining the ability to determine a...
Apple Watch 8 Unreleased Feature Thumb

Apple Watch Series 8 Model Rumored to Feature 5% Larger Display

Monday July 4, 2022 5:50 am PDT by
Apple is working on an Apple Watch Series 8 model with a larger display, according to DSCC's Ross Young and Haitong International Securities's Jeff Pu. In October last year, Young suggested that the Apple Watch Series 8 could come in three display sizes. Now, responding to a query about the rumor on Twitter, Young claims that the additional display size joining the Apple Watch lineup will be ...
macbook air m2

Exclusive: Apple Plans to Launch MacBook Air With M2 Chip on July 15

Wednesday June 29, 2022 5:23 pm PDT by
The redesigned MacBook Air with the all-new M2 Apple silicon chip will be available for customers starting Friday, July 15, MacRumors has learned from a retail source. The new MacBook Air was announced and previewed during WWDC earlier this month, with Apple stating availability will begin in July. The MacBook Air features a redesigned body that is thinner and lighter than the previous...