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 Forum: iOS 15

Popular Stories

ipad mini 2021 youtube

New Report Reveals When to Expect the iPad Mini 7

Tuesday October 1, 2024 2:09 pm PDT by
Apple is working on a new iPad mini that will "potentially" be released "by the end of 2024," according to a report today from Bloomberg's Mark Gurman. Last month, Gurman reported that Apple had "new iPads in the works," including an upgraded version of the iPad mini. At the time, he said the device was "on deck for Apple's October event" alongside the first M4 Macs. The wording in his...
airpods pro 2 gradient

AirPods Pro 3 Expected Next Year: Here's What We Know

Tuesday October 1, 2024 5:47 am PDT by
Despite being released over two years ago, Apple's AirPods Pro 2 continue to dominate the wireless earbud market. However, with the AirPods Pro 3 expected to launch sometime in 2025, anyone thinking of buying Apple's premium earbuds may be wondering if the next generation is worth holding out for. Apart from their audio and noise-canceling performance, which are generally regarded as...
apple silicon mac lineup wwdc 2022 feature purple

MacBook Pro, iMac, and Redesigned Mac Mini With M4 Chips on Track to Launch 'This Year'

Tuesday October 1, 2024 1:57 pm PDT by
Apple plans to release new MacBook Pro, iMac, and Mac mini models with the M4 series of chips "this year," according to Bloomberg's Mark Gurman. Gurman initially said these Macs would likely be announced during a virtual event this October, but he has been more vague about the timing lately, with wording such as "in the coming weeks" and now merely "this year." In any case, it is clear that...
15 New Things Your iPhone Can Do in iOS 18

15 New Things Your iPhone Can Do in iOS 18.1

Friday September 27, 2024 6:14 am PDT by
Apple is set to release iOS 18.1 in October, bringing the first set of Apple Intelligence features to iPhone 15 Pro and iPhone 16 models. This update marks a significant step forward in Apple's AI integration, offering a new Siri contextually-aware experience and a range of additional capabilities powered by on-device machine learning and large language models. There are a couple of handy new...
iPhone SE 4 Thumb 2

Apple's Next New iPhone to Debut in the Spring: What to Expect

Tuesday October 1, 2024 3:14 am PDT by
Apple's budget-friendly iPhone SE is set for a major overhaul with a fourth generation model expected to launch in spring 2025. The upcoming model will mark a significant departure from its predecessors, adopting several features from higher-end iPhones while maintaining its position as the most affordable new model in Apple's lineup. According to recent reports, the iPhone SE 4 will sport a ...
iPhone SE 4 Thumb 1

iPhone SE With Apple Intelligence, New iPad Air, and More Reportedly Launching 'Early Next Year'

Tuesday October 1, 2024 12:38 pm PDT by
Apple plans to release a new iPhone SE with Apple Intelligence support, new iPad Air models, and an updated Magic Keyboard for the iPad Air at some point "early next year," according to a report today from Bloomberg's Mark Gurman. The next iPhone SE will have a similar design as the iPhone 14, including an edge-to-edge screen with a notch, according to Gurman. This means the device will...
m3 mbp space black

What to Expect From an Apple Event in October: iPad Mini 7, Redesigned Mac Mini, and More

Friday September 27, 2024 11:47 am PDT by
Apple will likely hold another event in October this year to announce new Macs and iPads. If so, it would be the fourth time in the last five years that Apple has held an event in October. Last year, Apple held a virtual event on Monday, October 30 to announce new MacBook Pro and iMac models with the M3 series of chips. Subscribe to the MacRumors YouTube channel for more videos. Below, we...
Generic iOS 18

iOS 18.0.1 Coming Soon: What to Expect for Your iPhone

Wednesday October 2, 2024 5:50 am PDT by
Following the release of iOS 18 for the iPhone last month, Apple is preparing to release iOS 18.0.1 with bug fixes in the near future. We previously reported that Apple has been internally testing iOS 18.0.1, and today a private account on X with a proven track record of sharing iOS-related information said the update will have a build number of 22A3370. We expect iOS 18.0.1 to be a minor ...