Forgot Your iPhone Passcode? Here's What You Can Do

By Velihan Dur Updated Smartphone tips
Forgot Your iPhone Passcode? Here's What You Can Do

You're staring at a screen that says 'iPhone Unavailable'. Panic? No need, but you do have to take the right steps straight away. Forgot your iPhone passcode? In this article you'll find the three proven methods to get back into your iPhone, how to restore a backup and what you can do if you don't have a computer to hand.

What happens if you forgot your iPhone passcode?

Apple takes iOS security extremely seriously. Enter the wrong passcode too many times and your device gets locked, first temporarily and eventually permanently. This strict measure prevents brute-force attacks, where people with bad intentions or software programs keep guessing codes endlessly. If you've forgotten your iPhone passcode, you have to accept one hard truth: there's no secret trick or hidden software that simply lets you bypass the passcode.

To make an iPhone that's locked after too many failed attempts usable again, the device has to be completely erased. That means you force a factory reset on your iPhone. Without a recent backup, local data such as photos, messages and downloaded files will unfortunately be lost in the process. Do you have an automatic backup in iCloud or stored locally on your computer? Then you can easily restore it after the reset, and your device will be exactly as it was before, just with a new passcode.

Which recovery method suits your situation?

Not every locked mobile phone needs the same approach. The quickest route depends on your iOS version and the equipment you have available. Compare the options below to make the right choice straight away.

Recovery method Requirements Speed Best for
Directly on screen iOS 15.2+, active Wi-Fi/4G, Apple ID password Very fast Recent iPhones with an active internet connection.
Via 'Find My' Another device with internet access, Apple ID details Fast Situations where you don't have a computer, but do have a tablet or another mobile phone.
Via a computer Mac or Windows PC, USB cable, recovery mode Average The ultimate fallback if the iPhone is offline or frozen.

Choose the on-screen method if your device is connected to Wi-Fi. Choose 'Find My' if you don't have a computer but can borrow a friend's tablet or smartphone. Skip these wireless options and go for the computer method if your iPhone is completely offline and you need to force recovery mode.

Method 1: Directly on the screen (iOS 15.2 and later)

Since iOS 15.2, Apple has made the process a lot simpler. You no longer need any cables as long as the device is connected to a network. Follow these steps to erase the device directly.

  1. 1

    Keep entering the wrong passcode until the message 'iPhone Unavailable' or 'Security Lockout' appears on the screen.

  2. 2

    Tap the 'Forgot Passcode?' or 'Erase iPhone' option that appears in the bottom-right corner of the lock screen.

  3. 3

    Confirm that you want to erase the device and enter your Apple ID password. This signs you out of your account and starts the factory reset.

  4. 4

    Wait for the phone to restart with the welcome setup.

Is your device running iOS 17 or later and did you only just change your passcode? Then use the 'Enter Previous Passcode' option. Within 72 hours of a change, this lets you use your old passcode to set a new one straight away. This is the only exception where you don't need to erase your iPhone.

Method 2: Erase your iPhone via 'Find My' (without a computer)

Is your device offline or is the screen not responding properly? Then a remote reset is the most practical solution. It works from any device with a web browser, as long as the locked phone can connect to the internet.

  1. 1

    Go to iCloud.com on another device, such as an iPad, a laptop or a friend's smartphone.

  2. 2

    Sign in with your Apple ID details. Do you have two-factor authentication turned on and can't receive the code? Then use a trusted device that's already signed in.

  3. 3

    Open the 'Find Devices' web app and click 'All Devices' at the top.

  4. 4

    Select your locked iPhone from the list of linked devices.

  5. 5

    Choose the 'Erase This Device' option. Confirm your choice to remotely factory reset the device. As soon as the phone reconnects to a network, it will be wiped straight away.

Method 3: Factory reset via Mac or Windows PC

Has your smartphone lost its internet connection, or are the wireless methods not working? Then restoring your iPhone via a computer is the most reliable solution. For this, we use recovery mode.

  1. 1

    Connect the phone to a Mac or Windows PC with a reliable USB cable. Avoid cheap cables without MFi certification to prevent connection errors during recovery mode.

  2. 2

    Open Finder (on a Mac with macOS Catalina or later) or launch iTunes (on a Windows PC or an older Mac).

  3. 3

    Put the iPhone into recovery mode using the right button combination for your specific model (see the table in the next section).

  4. 4

    Look at your computer screen. A pop-up will appear saying there's a problem with the device and that recovery mode is active.

  5. 5

    Click 'Restore' in this window. The computer will now download the latest iOS software and reset your device to factory settings. Getting a time-out because the download takes longer than 15 minutes? Then the phone will automatically exit recovery mode. Just put the device back into recovery mode to carry on.

Overview: button combinations for recovery mode

To complete the computer method successfully, the device has to be in recovery mode. Apple uses different button combinations for this, depending on your smartphone's generation. Perform the actions below in quick succession while the phone is connected to the Mac or Windows PC.

iPhone model Button combination for recovery mode
iPhone 8, X, 11, 12, 13, 14, 15, 16, 17 (and SE 2nd/3rd gen) and later Briefly press volume up, briefly press volume down, then hold the side button until the recovery mode screen appears.
iPhone 7 and 7 Plus Hold the volume down button and the side (or Sleep/Wake) button at the same time. Only let go when the recovery mode screen appears.
iPhone 6s and earlier (including SE 1st gen) Hold the Home button and the top (or side) button at the same time until you see the recovery mode screen.
Forgot your iPhone passcode? Here's what you can do right now!

Restoring your data and preventing future lockouts

Once the factory settings have loaded and recovery mode has closed, the screen greets you with the 'Hello' setup. This is the moment to rescue your data and set up your security more smartly. Go through the following checklist to get back up and running straight away:

  • During the new setup, choose the 'From iCloud Backup' option or restore via your Mac or PC. That way you'll get all your apps, contacts and messages back straight away.

  • Set up Face ID or Touch ID right away. In practice, you'll find that biometric security minimises the chance of forgetting your passcode, because you rely much less on typing it in manually. Both Face ID and Touch ID give you quick access without compromising on security.

  • Save your brand-new passcode in a secure password manager or write it down and keep it somewhere safe at home.

  • Check in your settings, under your Apple ID profile, that automatic iCloud backups are turned on. This makes sure you'll always have a recent backup to fall back on if you get locked out again.

FAQs about a forgotten iPhone passcode

Can I unlock my iPhone without erasing everything?

No, unless your device is running iOS 17 or later and you changed the passcode in the last 72 hours. In that specific case, you can use the 'Enter Previous Passcode' option to create a new passcode straight away. In every other situation, a factory reset is the only way to reset Apple's strict security. If you've forgotten your iPhone passcode, losing data is unavoidable without a backup.

Do I always need a computer?

No, these days a computer often isn't necessary. If your smartphone is connected to Wi-Fi or a mobile network, you can use the erase option directly on the lock screen (from iOS 15.2) or erase the device remotely via iCloud.com. Only if the device is offline or frozen will you need recovery mode via a Mac or Windows PC.

What if Finder or iTunes doesn't recognise my iPhone in recovery mode?

First check that the USB cable supports data transfer (ideally use an original Apple cable) and try a different USB port on your computer. Then force recovery mode again by performing the button combination for your model firmly and quickly. Often the software will pick up the signal on a second attempt in recovery mode.

A forgotten passcode means you're locked out for a while, but with the right recovery method you'll have your iPhone up and running again in no time. Choose the method that suits you, reset your device, and check straight away that your automatic iCloud backups are turned on for the future.

Read more

Recently Viewed

Choose a model to save it to your preferences.

Pick your FREE gift in advance!

It will then be added automatically for you with an order of at least .

This gift is no longer available. Please choose another gift.

Saving your choice…

Leave Business mode?

This will return you to normal shopping mode:

  • Your quote items will be removed
  • The business menu will be hidden
  • Your regular shopping cart is not affected

Switch to Business mode

This will activate business mode for your session:

  • Pay on account
  • Request a non-binding quote
  • Personal advice
  • Easy ordering

After activation, a business menu appears in the header. You can manage your quote and switch back from there.