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

airdrop logo

AirDrop Not Working? Here's How to Fix It

Wednesday December 22, 2021 3:06 pm PST by
AirDrop is a handy feature on Apple devices since it lets users discover nearby Macs and iOS devices and securely transfer files between them over Wi-Fi and Bluetooth. The only problem is that it doesn't always work. If that sounds like your current experience with AirDrop, this article offers some troubleshooting steps that may help. AirDrop is designed to let you send and receive photos,...
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....
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...
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...
iphone 13 vs iphone 12

Best Way to Transfer Data From Your Old iPhone to a New iPhone 13

Friday September 24, 2021 1:19 am PDT by
If you've got a new iPhone 13 to replace your current iPhone, there are a few ways you can migrate your data across to the new device. You can restore your apps, data, and settings from your most recent iCloud backup, restore from a backup on your computer, or you can use device-to-device migration to transfer your data directly from your previous iPhone to your new one. There are currently known ...
Recovery Contact Feature

iOS 15: How to Set a Recovery Contact for Your Apple ID Account

Thursday October 14, 2021 11:36 am PDT by
Losing your Apple ID password can make your digital life a misery, because it can leave you locked out of the account that you use to manage your Apple devices, unable to access your iCloud data and manage your app and service subscriptions. In this scenario, Apple can't just reset your password for you, especially if your have two-factor authentication enabled. Setting up a recovery is one ...
macos monterey migration assistant hero

How to Transfer Data From Your Old Mac to a New Mac

Friday December 3, 2021 4:41 pm PST by
When you want to move data from an old Mac to a new one, the most reliable method is to use Apple's Migration Assistant. Found in the Utilities folder of your Applications folder, Migration Assistant copies all of your files from your old Mac to your new Mac, so you don't have to transfer them manually. The first set of steps in this article assume that you have both the old Mac and the new...
erase content settings monterey

How to Erase All Content and Settings on Mac

Wednesday October 27, 2021 8:33 pm PDT by
Following in the footsteps of the iPhone and iPad, Apple silicon Macs and Intel Macs with a T2 security chip (2017-2020 models) now have an "Erase All Content and Settings" option available in macOS Monterey. This article explains what the option does and how and when to use it. Traditionally, wiping a Mac and returning it to factory settings involved manually signing out of a range of...

Popular Stories

iPhone 14 Mock pill and hole thumb

ProMotion Now Expected to Remain Exclusive to iPhone 14 Pro Models, Not Expand to Entire Lineup

Sunday January 16, 2022 8:56 am PST by
Continuing the tradition set with the iPhone 13 Pro, only the highest-end iPhone 14 models will feature Apple's ProMotion display technology, according to a respected display analyst. Ross Young, who on multiple occasions has detailed accurate information about Apple's future products, said in a tweet that ProMotion will not be expanded to the entire iPhone 14 lineup and will remain...
AirPods Pro Gen 3 Mock Feature Red

AirPods Pro 2 Could Start a New Accessory Ecosystem

Friday January 14, 2022 2:34 am PST by
Apple's second-generation AirPods Pro could arrive alongside a new series of accessories, recent leaked images suggest. Alleged leaked photos of the next-generation AirPods Pro obtained by MacRumors showed a charging case with a metal loop on the side for attaching a strap. Apple has not used this design for any of its other AirPod models and it is unclear why it would be added in this...
Unlikely Products 2022 Feature

Six Rumored Apple Products You're Unlikely to See This Year

Saturday January 15, 2022 2:06 pm PST by
Much has been said about what consumers could see from Apple in 2022, but the company is also working on a handful of rumored products that aren't expected to be unveiled for at least another 12 months, and in some cases a lot longer. Of course, that's assuming they get released at all. Apple works on many potential products some of which ultimately never see the light of day. With that in...
safari icon blue banner

Safari Bug Allows Websites to Track Your Recent Browsing Activity in Real Time

Sunday January 16, 2022 3:37 pm PST by
A bug in WebKit's implementation of a JavaScript API called IndexedDB can reveal your recent browsing history and even your identity, according to a blog post shared on Friday by browser fingerprinting service FingerprintJS. In a nutshell, the bug allows any website that uses IndexedDB to access the names of IndexedDB databases generated by other websites during a user's browsing session....
ipad air 4 video

New iPad Air Rumored to Launch This Spring With A15 Chip, 5G, Center Stage Camera, and More

Saturday January 15, 2022 8:05 pm PST by
Apple is planning to release a fifth-generation iPad Air with similar features as the sixth-generation iPad mini, including an A15 Bionic chip, 12-megapixel Ultra Wide front camera with Center Stage support, 5G for cellular models, and Quad-LED True Tone flash, according to Japanese blog Mac Otakara. Citing reliables sources in China, the report claims that the new iPad Air could be...
netflix2

Netflix Again Raises Prices for All Plans, 4K Streaming Now $20 Per Month

Friday January 14, 2022 12:46 pm PST by
Netflix today updated the prices for its streaming plans, and all of its offerings are now more expensive. The Basic plan is now priced at $9.99 per month, the Standard plan is priced at $15.49 per month, and the Premium plan is priced at $19.99 per month. The Basic plan is $1 more expensive, up from $8.99 per month. This plan allows users to watch on just one screen at a time, and it limits ...
top stories 20220115

Top Stories: iPhone 14 Pro Rumors, iCloud Private Relay Controversy, iOS 15.2.1 Released, and More

Saturday January 15, 2022 6:00 am PST by
Hole-punch? Pill? Hole-punch and pill? Rumors about what the front camera system on the iPhone 14 Pro will look like are evolving rapidly, and it now appears we might be getting a novel but potentially controversial design later this year. Other major stories this week included some confusion and controversy about iCloud Private Relay being disabled for some T-Mobile customers, increasing...
iPhone 14 Mock pill and hole 16x9 120hz

Analyst: All iPhone 14 Models to Feature 120Hz Displays, 6GB of RAM, and More

Friday January 14, 2022 7:02 am PST by
Apple is rumored to announce four new iPhone 14 models in September, and ahead of time, analyst Jeff Pu has outlined his expectations for the devices. In a research note with Haitong International Securities, obtained by MacRumors, Pu claimed that all iPhone 14 models will feature ProMotion displays, compared to only Pro models currently. ProMotion enables a variable refresh rate up to 120Hz ...