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

iOS 16

iOS 16.3 Now Available for Your iPhone With These 4 New Features

Friday February 3, 2023 1:13 pm PST by
Apple released iOS 16.3 in late January following nearly six weeks of beta testing. The software update is available for the iPhone 8 and newer, and while it is a relatively minor update, it still includes a handful of new features, changes, and bug fixes. Below, we've recapped new features in iOS 16.3, including support for physical security keys as a two-factor authentication option for...
iPhone 14 Pro Purple Side Perspective Feature Purple

Gurman: Apple Considering New High-End iPhone Alongside Pro and Pro Max

Sunday February 5, 2023 6:07 am PST by
Apple has discussed selling a new top-of-the-line iPhone alongside the Pro and Pro Max models in 2024 at the earliest, according to Bloomberg's Mark Gurman. Based on this timeframe, the device would be part of the iPhone 16 lineup or later. In a September 2022 edition of his weekly "Power On" newsletter, Gurman said there was "potential" for an iPhone 15 Ultra to replace the iPhone 15 Pro...
ipad air purple

Deals: M1 iPad Air Hits Record-Low Prices at TigerDirect, Starting at $313.99 (48% Off) [Updated]

Saturday February 4, 2023 10:05 am PST by
Online retailer TigerDirect has slashed pricing on the M1 iPad Air in several colors, offering the base 64GB configuration for just $313.99 in Purple and Pink. Note: MacRumors is an affiliate partner with TigerDirect. When you click a link and make a purchase, we may receive a small payment, which helps us keep the site running. That's a savings of 48% compared to Apple's normal $599.00...
mac studio pink

Apple May Not Launch Updated Mac Studio With M2 Ultra Chip Due to Similarity With Upcoming Mac Pro

Sunday February 5, 2023 6:06 am PST by
A new version of the Mac Studio with the "M2 Ultra" chip is unlikely to arrive in the near future, according to Bloomberg's Mark Gurman. In the latest edition of his "Power On" newsletter, Gurman explained that since the upcoming Apple silicon Mac Pro is "very similar in functionality to the Mac Studio," Apple may wait until the release of M3- or M4-series chips to update the machine, or...
webkit vs chromium feature

Google Working on Browser for iOS That Would Break Apple's App Store Rules

Saturday February 4, 2023 1:30 am PST by
Google's Chromium developers are working on an experimental web browser for iOS that would break Apple's browser engine restrictions, The Register reports. The experimental browser, which is being actively pursued by developers, uses Google's Blink engine. Yet if Google attempted to release it on the App Store, it would not pass Apple's App Review process. Apple's App Store rules dictate...
Apple Silicon Teal Feature

The Next Big Apple Silicon Device May Not Be a Mac or iPad

Wednesday February 1, 2023 3:57 am PST by
Apple's next device with an Apple silicon chip may not be a Mac or an iPad, but rather an advanced external display, according to recent reports. The display, which is rumored to arrive this year, is expected to sit somewhere between the $1,599 Studio Display and the $4,999 Pro Display XDR – but more exact information about the device's positioning and price point is as yet unknown. While ...
top stories 4feb2023

Top Stories: New HomePod Launches, iOS 16.3.1 Coming Soon, and More

Saturday February 4, 2023 6:00 am PST by
This week saw the launch of the final product from Apple's January hardware announcements, with the second-generation HomePod making its way into customers' hands. Other news and rumors this week included signs of an interim iOS 16.3.1 bug fix update in the works as we await a fresh round of beta testing for a more significant iOS 16.4 update, a report on the potential dangers of using...
maxresdefault

Hands-On With Apple's Second-Generation HomePod

Friday February 3, 2023 1:28 pm PST by
Today is the official launch day for the second-generation HomePod that was introduced in January, and we picked one up to compare it to the original HomePod that Apple discontinued in 2021. Subscribe to the MacRumors YouTube channel for more videos. Design wise, the second-generation HomePod looks a lot like the first-generation model, featuring the same rounded design and acoustic mesh...