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

anker 563 dock ports

Anker's Latest USB-C Docking Station Brings Triple-Display Support to M1 Macs

Wednesday May 18, 2022 7:06 am PDT by
While Apple's early M1-based Macs can only officially support a single external display, there are ways around the limitation. Anker is launching a new 10-in-1 USB-C docking station today which delivers just that. The Anker 563 USB-C dock includes two HDMI ports and a DisplayPort port, and it leverages DisplayLink to carry multiple video signals over a single connection. Given that this hub...
Prosser Series 8 3

Apple Watch Series 8 Rumored to Feature New Design With Flat Display

Wednesday May 18, 2022 6:21 am PDT by
The Apple Watch Series 8 could feature an all-new design with a flat display, according to the leaker known as "ShrimpApplePro." In his latest video on the YouTube channel Front Page Tech, Jon Prosser highlighted information from ShrimpApplePro that suggests the Apple Watch Series 8 could feature a flat display in what seems to be a design originally rumored for the Apple Watch Series 7. ...
apple ar headset concept 1

Apple's Headset Said to Feature 14 Cameras Enabling Lifelike Avatars, Jony Ive Has Remained Involved With Design

Friday May 20, 2022 6:50 am PDT by
Earlier this week, The Information's Wayne Ma outlined struggles that Apple has faced during the development of its long-rumored AR/VR headset. Now, in a follow-up report, he has shared several additional details about the wearable device. Apple headset render created by Ian Zelbo based on The Information reporting For starters, one of the headset's marquee features is said to be lifelike...
apple data auction iphone privacy ad

Apple Highlights iPhone's Latest Privacy Features in New 'Data Auction' Ad

Wednesday May 18, 2022 9:00 am PDT by
Apple today shared a new ad highlighting iPhone privacy features like App Tracking Transparency and Mail Privacy Protection that are designed to give users more transparency and control when it comes to their personal data being collected. The ad revolves around a young woman named Ellie who discovers that her personal data is being sold at an auction house, with bids being placed on her...
apple ar headset concept 2

Apple's AR/VR Headset Nearing Completion as Board Gets Demo

Thursday May 19, 2022 9:52 am PDT by
Apple last week demonstrated its upcoming AR/VR headset to Apple board members, indicating that the device is in an advanced stage of development and could see a debut in the not too distant future, reports Bloomberg. Apple has also ramped up development of the software that runs on the headset, with that software expected to be called "RealityOS," or rOS for short. Render via designer Ian ...