How to Unlock Your iPhone When You Forget the Passcode

Forgetting an iPhone passcode is stressful because the answer is not “just bypass it”. Apple designs the iPhone so that the passcode protects the data on the device. That is good security when the phone is lost or stolen. It is less charming when the phone is yours and your brain has decided to delete the number.

The important thing to know is this: if you cannot remember the passcode, Apple’s official recovery process usually involves resetting the iPhone. That erases the data currently on the device. After that, you can restore from a backup if you have one.

First: is it the iPhone passcode or Apple Account password?

These are different things:

  • iPhone passcode: the code used to unlock the device.
  • Apple Account password: the password for iCloud, App Store and Apple services.

If you forgot your Apple Account password, that is a different recovery process. If you forgot the passcode that unlocks the iPhone, this article is the one you need.

If you recently changed the passcode

On newer iOS versions, Apple has a feature that may let you use your old passcode for a limited time after changing it. Apple calls this Passcode Reset, and it is intended for the “I changed it yesterday and now my brain has packed a suitcase” situation.

If that option appears on your iPhone, follow the onscreen instructions. If it does not appear, you will usually need to reset the device.

The hard truth: resetting erases the iPhone

Apple’s official guidance is clear: to regain access after forgetting the passcode, you must reset the iPhone. This erases the data currently on it.

That is why backups matter. If your iPhone has a recent iCloud or computer backup, you can restore your data during setup afterwards. If it does not, there may be data you cannot recover.

Option 1: Reset directly on the iPhone

If the iPhone is running iOS 15.2 or later, you may be able to reset it directly from the lock screen without using a computer.

The exact onscreen wording can vary, but generally you need the iPhone to be connected to the internet and you need the Apple Account details associated with the device. Follow the prompts carefully. This is not a time for heroic guessing.

Option 2: Use recovery mode with a Mac or PC

If you cannot reset directly on the device, use recovery mode.

You will need:

  • A Mac or Windows PC.
  • A cable for the iPhone.
  • An internet connection.
  • Some patience — allow up to an hour.

Step 1: turn off the iPhone

For iPhones with Face ID, press and hold the Side button and Volume Down button until the power-off slider appears, then turn the phone off.

For iPhones with a Home button or top button, hold the Side button or Top button until the power-off slider appears, then turn it off.

Step 2: put the iPhone into recovery mode

The button you hold depends on the model:

  • iPhone with Face ID: hold the Side button while connecting to the computer.
  • iPhone 8, iPhone 8 Plus, iPhone SE 2nd/3rd generation: hold the Side button while connecting.
  • iPhone 7 and iPhone 7 Plus: hold Volume Down while connecting.
  • iPhone 6s or earlier, iPhone SE 1st generation: hold the Home button while connecting.

Keep holding the correct button until the recovery screen appears. Do not release just because you see the Apple logo.

Step 3: restore the iPhone

On a Mac, open Finder and select the iPhone in the sidebar. On Windows, use the Apple Devices app or iTunes where appropriate.

When asked to Restore or Update, choose Restore. The computer downloads software and restores the iPhone.

If the download takes more than about 15 minutes and the iPhone exits recovery mode, let the download finish, then put the iPhone back into recovery mode and continue.

Step 4: set up and restore your backup

When the restore finishes, the iPhone shows the Hello screen. During setup, choose to restore from an iCloud backup or a computer backup if you have one.

If Activation Lock appears, you will need the Apple Account details previously used on the iPhone. This is normal. It is there to stop stolen phones being wiped and reused.

What not to do

  • Do not pay for random “unlock without data loss” miracle tools.
  • Do not keep guessing passcodes until the device locks for longer and longer.
  • Do not erase anything until you understand whether you have a backup.
  • Do not confuse the iPhone passcode with the Apple Account password.

There are legitimate recovery methods, and then there is internet snake oil wearing a download button.

Useful, reliable kit for this guide

Some links may be affiliate links. Apple Mac Man may earn a small commission at no extra cost to you.

Do not buy software claiming to unlock an iPhone without data loss. For Apple’s official recovery method, the useful purchase is usually the correct cable, not magic software in a fake lab coat.

Need help before you erase anything?

If the phone contains important photos, business data, WhatsApp messages or anything irreplaceable, get help before starting. The right path depends on the iOS version, backup status, Apple Account access and whether the phone is already disabled.

Official Apple references: forgotten iPhone passcode and temporary old passcode reset.

Scroll to Top