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 18 Mock iPhone 16 Feature Gray

Revealed: iOS 18 Works With These iPhone Models

Monday June 10, 2024 3:57 am PDT by
iOS 18 will be compatible with the same iPhone models as iOS 17, according to a post on X today from a private account with a proven track record of sharing build numbers for upcoming iOS updates. iOS 18 will be compatible with the iPhone XR, and hence also the iPhone XS and iPhone XS Max models with the same A12 Bionic chip, but older iPhone models will miss out. Here is the full...
ios 18 tile summary

Apple Announces iOS 18 With New Customization Features, Redesigned Photos App, and More

Monday June 10, 2024 10:17 am PDT by
Apple today previewed iOS 18, the next major update to the operating system for the iPhone, with new customization features, a redesigned Photos app, and more. iOS 18 features new customization tools for the Home Screen. App icons now feature Dark Mode and users can tint them with a color to create a unique look. Apps can also now be placed anywhere on the Home Screen freely. The Control...
WWDC24 Live Coverage Article

WWDC 2024 Apple Event Live Keynote Coverage: iOS 18, Apple's AI Push, and More

Monday June 10, 2024 9:20 am PDT by
Apple's Worldwide Developers Conference (WWDC) starts today with the traditional keynote kicking things off at 10:00 a.m. Pacific Time. MacRumors is on hand for the event and we'll be sharing details and our thoughts throughout the day. We're expecting to see a number of software-related announcements with a focus on Apple's efforts to infuse AI throughout its operating systems and apps....
iOS 18 Siri Integrated Feature

Massive iPhone Upgrade Coming This Week But These Devices Will Miss Out

Sunday June 9, 2024 1:25 pm PDT by
Apple is planning a major AI overhaul in iOS 18, with a feature set it is referring to as "Apple Intelligence." However, these new features will not work on older iPhones, even if they do appear on the new operating system's device compatibility list. Apple's initial AI roadmap for iOS 18 is said to come in two parts: Basic AI features that will be processed on-device, and more advanced...
m3 macbook air purple

Amazon Introduces Record Low Prices on Every M3 MacBook Air

Sunday June 9, 2024 7:57 am PDT by
On Friday we tracked new all-time low prices on the 13-inch M3 MacBook Air, and today Amazon has expanded this sale with record low prices on the 15-inch models as well. Thanks to these additional deals, every single model of the M3 MacBook Air is now available at an all-time low price. Note: MacRumors is an affiliate partner with Amazon. When you click a link and make a purchase, we may...
Next Gen CarPlay WWDC24 1

Apple Provides Updated Look at Next-Generation CarPlay at WWDC 2024

Monday June 10, 2024 7:11 pm PDT by
Apple today shared a few WWDC 2024 coding sessions related to its upcoming next-generation CarPlay system ahead of its launch later this year. The sessions include lots of updated next-generation CarPlay images, with one revealing new Vehicle, Media, and Climate apps in action for the first time. MacRumors previously discovered evidence of these apps in the iOS 17.4 beta. Next-generation...
iPad Air 5

New: iPadOS 18 Drops Support for These iPad Models

Monday June 10, 2024 4:16 am PDT by
iPadOS 18 will drop support for iPad models equipped with the A10X Fusion chip, according to a post on X today from a private account with a proven track record of sharing build numbers for upcoming iOS and iPadOS updates. In other words, iPadOS 18 will drop support for the 10.5-inch iPad Pro and the second-generation 12.9-inch iPad Pro. Support for the sixth-generation iPad, which uses the...