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 Stories

How to Install the iOS 15 Public Beta

Wednesday June 30, 2021 11:11 am PDT by Juli Clover

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....

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 Tim Hardwick

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...

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

Friday January 28, 2022 10:46 am PST by Tim Hardwick

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...

How to Restore Apple Watch Using Your iPhone

Thursday March 17, 2022 3:38 pm PDT by Tim Hardwick

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...

How to Erase Your iPhone or iPad

Thursday April 8, 2021 4:28 pm PDT by Tim Hardwick

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...

How to Authorize Apple TV Purchases on Apple Watch

Tuesday March 22, 2022 10:42 am PDT by Tim Hardwick

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...

macOS 12.3: How to Add Notes to iCloud Keychain Entries

Tuesday February 8, 2022 3:07 pm PST by Tim Hardwick

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...

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

Monday February 7, 2022 1:01 pm PST by Tim Hardwick

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

Gurman: Apple Preparing Pre-Recorded iPhone 14 and Apple Watch Series 8 Event

Sunday August 7, 2022 6:13 am PDT by Sami Fathi

Apple has "started to record" its virtual September event, where it's expected to announce the upcoming iPhone 14 lineup, the Apple Watch Series 8, and a new "rugged" Apple Watch model, according to Bloomberg's Mark Gurman. Writing in his latest Power On newsletter, Gurman says the event, which is expected to take place in the early part of September, is already under production, implying...

Standard Apple Watch Series 8 Rumored to Feature Same Design as Series 7

The standard 41mm and 45mm models of the Apple Watch Series 8 will feature the same design as the Apple Watch Series 7, according to Twitter user @ShrimpApplePro, who was first to reveal that iPhone 14 Pro models would feature a new pill-and-hole display. Titanium will not be an option for the standard Apple Watch Series 8 models either, according to @ShrimpApplePro, but Bloomberg's Mark...

Color Options for All iPhone 14 Models: Everything We Know

The iPhone 14 and iPhone 14 Pro models are rumored to be available in a refreshed range of color options, including an all-new purple color. Most expectations about the iPhone 14 lineup's color options come from an unverified post on Chinese social media site Weibo earlier this year. Overall, the iPhone 14 and iPhone 14 Pro's selection of color options could look fairly similar to those of the ...

iOS 16 Beta 5: Battery Percentage Now Displayed in iPhone Status Bar

Monday August 8, 2022 10:43 am PDT by Juli Clover

With the fifth beta of iOS 16, Apple has updated the battery icon on iPhones with Face ID to display the specific battery percentage rather than just a visual representation of battery level. The new battery indicator is available on iPhone 12 and iPhone 13 models, with the exception of the 5.4-inch iPhone 12/13 mini. It is also available on the iPhone X and the iPhone XS. Battery percent...

Bigger iPhone 14 Pro Max Camera Bump Shown Alongside iPhone 13 Pro Max

Monday August 8, 2022 4:33 am PDT by Tim Hardwick

The camera bump on the upcoming iPhone 14 Pro Max is expected to be the largest rear lens housing Apple has ever installed on its flagship smartphones, and a new photo offers a rare glimpse at just how prominent it is compared to Apple's predecessor device. iPhone 14 Pro Max dummy (left) vs iPhone 13 Pro Max All iPhone 14 models are expected to see upgrades to the Ultra Wide camera on the...

Rumor Claims Next iPad Pro to Feature New Four-Pin Smart Connector

Sunday August 7, 2022 11:57 am PDT by Sami Fathi

A new rumor claims that the next-generation 12.9-inch and 11-inch iPad Pro will feature a new four-pin Smart Connector, an update from the current three-pin connector in the iPad Pro. The rumor from Mac Otakara, citing "reliable sources," says that the next iPad Pro, expected to debut possibly as soon as this fall, will feature a new Smart Connector that has four-pins rather than three. The...