You typed the code you were sure of, then a few variations, and now the screen says iPhone Unavailable. Maybe it’s your own phone after a passcode change, or a parent’s phone nobody remembers the code for. Forgot iPhone passcode? Here’s the honest bit first: Apple has no back door. Unless you changed the passcode in the last three days, getting back in means erasing the iPhone and restoring your data from a backup. The good news: it’s free, and it takes about an hour.
Quick answer:
- Changed the passcode in the last 72 hours? Tap Forgot Passcode?, then Enter Previous Passcode. Nothing gets erased.
- Otherwise, reset it on the phone: Forgot Passcode? > iPhone Reset, enter your Apple Account password, and pick Keep eSIM and Erase Data if you use an eSIM.
- No Forgot Passcode? button? Use a Mac or Windows PC and recovery mode.
- Afterwards: restore from your iCloud or computer backup. Without one, the photos and chats on the phone are gone.

Changed your passcode recently? Use the old one (72-hour window)
Start here: it’s the only fix that keeps everything on the phone. On iOS 17 or later, your iPhone keeps accepting the passcode you had before for 72 hours after you change it. Like the reset below, it needs the phone online (Wi-Fi or mobile data) with Find My on.
- Keep entering codes until the iPhone Unavailable screen appears. It shows after five wrong tries, and getting there is safe: nothing is erased.
- Tap Forgot Passcode? in the bottom corner.
- Tap Enter Previous Passcode, type the old code, and set a new passcode straight away.

Pick a new code you’ll actually remember this time, and write it somewhere safe that isn’t the phone itself. Don’t see Enter Previous Passcode? Then the change was more than 72 hours ago, you never changed it, or the old code was expired early, and the next section is your route.
Forgot iPhone passcode? Reset it on the iPhone itself
This erases everything on the phone, so it’s for when the old-passcode trick isn’t there. No computer needed, and it’s the quickest route for most people (Apple’s steps are here if you want the official page). It works on iOS 17 or later when the iPhone is online, signed in to your Apple Account, and has Find My switched on.
Sort out your Apple Account password before you start, because the reset stops without it. Forgot that too? Reset it first at iforgot.apple.com or from another Apple device, then come back.
- On the iPhone Unavailable screen, tap Forgot Passcode?. If there’s a timer, wait it out first; the button only works once you can try again.
- Look at the Last successful backup line on the next screen, if there is one. It tells you how much you’ll get back. Then tap iPhone Reset, and Start iPhone Reset on the Security Lockout screen.
- Type your Apple Account password. This signs the phone out of your account.
- Erase. Using an eSIM from Jio, Airtel or Vi? Pick Keep eSIM and Erase Data. No eSIM? You’ll just see Erase iPhone.

We’d keep the eSIM every time. Here’s why it matters in India: delete it and your number stops working on that phone until your carrier issues a new one. Keep it, and your number is live again as soon as the phone restarts. Our eSIM guide for Jio, Airtel and Vi covers getting one back if it does go.
Still on iOS 15.2 or iOS 16? The button says Erase iPhone instead, and there’s no keep-eSIM choice. If you use an eSIM on those versions, ask your carrier for an eSIM QR code before you erase, so you’re not stuck without your number.
No Forgot Passcode? button? Use a computer and recovery mode
The button doesn’t show when the phone is offline, Find My was off, or the iPhone is on an iOS version older than 15.2. The usual answer on Apple’s own forums, and Apple’s own fallback, is a restore from a computer. A Windows PC is fine; you don’t need a Mac, and a borrowed one works. Set aside up to an hour.
First, work out which button you’ll hold, because it depends on the model. No Home button on the front means a Face ID iPhone.
| Your iPhone | Button to hold |
|---|---|
| Face ID models, iPhone 8 or 8 Plus, iPhone SE (2nd or 3rd generation) | Side button |
| iPhone 7 or 7 Plus | Volume down |
| iPhone 6s or older, iPhone SE (1st generation) | Home button |
- Get the software. A Mac needs nothing extra: Finder does it. For Windows, install the free Apple Devices app from the Microsoft Store (iTunes works if the PC already has it).
- Turn the iPhone off with its power-off slider. On Face ID models, hold the side button with Volume down to bring up the slider; on older models, hold the side or top button.
- Start recovery mode. Plug the cable into the computer, then into the iPhone, and immediately hold your button from the table. Keep holding through the Apple logo and let go only when a computer and cable appear on the iPhone.
- Restore. In Finder on a Mac, select the iPhone in the sidebar (allow the accessory to connect if asked) and click Restore. Skip Update: on a locked phone it doesn’t get you past the passcode. On Windows, open Apple Devices, select the iPhone, tap Trust if asked, then General > Restore.

The catch is the download. The computer fetches the full iOS software first, and if that takes longer than 15 minutes, the iPhone drops out of recovery mode. Don’t unplug anything: let the download finish, then turn the iPhone off and do step 3 again. On a slow home connection, starting the restore on office or college Wi-Fi saves you that loop.
Buttons not responding, or you never get the computer-and-cable screen? Stop there. That’s a job for Apple service, covered at the end.
After the reset: restore your backup and pass Activation Lock
When the iPhone restarts on the Hello screen, set it up as you would a new phone. Two things to know before you start:
- Activation Lock. The phone asks for the Apple Account and password that were on it before the erase. This is what stops a thief from using a stolen iPhone, and a reset doesn’t remove it.
- Your backup. When setup asks how to bring your apps and data over, pick your iCloud backup, or the Mac or PC you backed up to. Don’t rush this screen: check the date on the backup before you tap it; the newest one isn’t always the one you expect.
No backup at all? Then there’s nothing to restore, and photos synced to iCloud Photos or Google Photos are your best hope; they come back once you sign in. Set up a backup the day you’re back in: our iPhone backup guide shows the free way to do it on a Windows PC.
Don’t bother
- Paid “iPhone unlocker” software. The tools that work on a forgotten passcode put the phone in recovery mode and erase it, which Apple’s free route already does. None of them legitimately removes Activation Lock: only Apple does that, and only with proof of purchase.
- YouTube bypass tricks. If a lock screen bypass worked on a current iPhone, it would be headline news, not a ten-minute video. At best you lose an evening; at worst you install something shady on your PC.
- Guessing more codes. Once you’re at iPhone Unavailable, more guesses only buy you more waiting.
When to take it to Apple in India
Go to an Apple Store or an Apple Authorised Service Provider if you have no computer to use or borrow, or if the buttons won’t put the iPhone into recovery mode. They’ll erase it the same way; nobody can unlock it with your data intact. Carry the bill or invoice. If Activation Lock is the problem and you can’t get into that Apple Account any more, proof of purchase is what lets you open an Activation Lock support request with Apple.
Bought it second-hand and the seller’s account is still on it? Ask the seller to remove the phone from their account at icloud.com/find. Without that or proof of purchase, Apple won’t remove the lock, which is why our genuine iPhone check tells you to confirm Activation Lock is off before you pay.
Quick questions
What does iPhone Unavailable mean?
It appears after five wrong passcodes, usually with a wait before you can try again. With no timer at all, the phone has stopped counting down; tap Forgot Passcode? if it’s there, or use the computer route.
Can I unlock my iPhone without losing data?
Only with the old passcode inside 72 hours of a change, on iOS 17 or later. Every other route erases the phone, and your data comes back only from a backup.
Can I reset my iPhone passcode without a computer?
Yes, on iOS 15.2 or later, if the phone is online and Find My was on. Tap Forgot Passcode? (or Erase iPhone on iOS 15.2 and 16) on the Unavailable screen.
Will Apple unlock my iPhone if I forgot the passcode?
No. Apple can erase it for you, and help with Activation Lock if you have proof of purchase, but it can’t recover the passcode or your data.
I forgot my Screen Time passcode. Is that the same thing?
No, it’s a separate code and nothing needs erasing. Reset it from Screen Time in Settings, under Passcode and Management, using the Apple Account you set up for Screen Time recovery; on a child’s iPhone, the parent does it from their own phone. Our parental controls guide walks through it.
Prefer to watch? Apple’s own video walks through the recovery-mode restore.
Got back in? Tell us which route worked and your iPhone model in the comments, and whether the download loop caught you.
Checked against Apple Support (India).
Last updated: November 2026




