Home: » Passcode Unlocking Guides » What to do when you forgot your iPhone passcode (my tried and tested fixes)

What to do when you forgot your iPhone passcode (my tried and tested fixes)

As an Apple Certified Independent Technician with over 10 years of hands-on experience with mobile technology, I have collated these solutions that allow you to unlock an iPhone if you can’t remember the passcode.

I have collected a number of methods that can be used get into your disabled device when you have been locked out. I also explains things you need to consider when doing an iPhone PIN reset, such as losing all of your data.

My guide covers:

  • Using a previous passcode.
  • Resetting your PIN.
  • Unofficial ways to bypass the iPhone passcode Apple doesn’t want you to know about.
  • How to avoid losing your data when changing your code.
  • Free and paid tools that can rescue data from a reset device.
iPhones showing lock screen

Advertisement

My article gives step-by-step instructions on all the passcode reset and data recovery techniques that I have tested and found work on Apple phones.

Read on to find out what I advise you do when you forgot your iPhone PIN code and need to unlock it – even after it has been disabled…

Fixes for a forgotten iPhone passcode

According to Apple, a forgotten iPhone passcode or a disabled device requires a factory reset it to fix it. The reset will remove iPhone passcode and wipe all your data.

You can restore your data after the factory reset so you get everything back.

This isn’t the only fix, and other solutions are covered in my guide.

The methods given here should work on all models of iPhone. However, I have also created guides to passcode unlock each different iPhone model that has device specific instructions.

These may be better if you find this guide doesn’t allow you to get into your model of phone.

Use your previous code

With the introduction of iOS 17, Apple has added a new feature known as Passcode Reset. If you ever forget your newly set passcode, this feature allows you to use your old passcode as a backup for up to 72 hours.

How to use Passcode Reset:

  1. Enter your passcode incorrectly five times in a row on your device’s lock screen..
  2. Wait until you see the message [Device] Unavailable“and a prompt asking you to try again later.
  3. Once prompted, locate and tap on the Forgot Passcode? option at the bottom corner of the screen.
  4. Tap Enter Previous Passcode.
  5. Enter your old passcode.
  6. Follow the instructions to create a new passcode.

Apple’s official reset method

If you forget your iPhone passcode Apple has a method of resetting it which wipes and restores all the data:

  1. You need your iPhone, a computer, and your lightning cable. If you don’t have access to a PC or Mac, find out how to unlock iPhone passcode without computer.
  2. Reboot your iPhone.
  3. Connect your computer to your iPhone using the cable as it reboots.
  4. As the iPhone reboots also press and hold the Side button, volume down button, or home button – depending on the model of phone you have.
  5. Keep holding the button until you see the recovery-mode screen.
  6. Remove the iPhone passcode and recover your data from a backup. This will get your iPhone enabled.

Advertisement

Unfortunately, Apple says if you don’t have a backup then you will lose all your data resetting the iPhone passcode.

There are iPhone passcode screen removal tools that allow you to keep your data even if you don’t have a backup – so avoid needing to restore.

If you do have backup then you can try iCloud passcode reset and recovery or computer reset and recovery.

Unlock PIN and recover phone data from iCloud

If you have been backing up your iPhone to iCloud then you will be able to factory reset it and restore your data.

You can use a computer or a friend’s phone to sign in to your iCloud account with your Apple ID and erase the device.

Just make sure the iPhone you are resetting is connected to Wi-Fi or a cellular network before you try to erase it or it won’t work.

You will need a computer or a friend’s phone before you begin.

  1. On your computer or a friend’s smartphone go to https://www.icloud.com/.
  2. Sign in using your Apple ID password.
    sign in to iCloud website
  3. Click the Find My iPhone icon (you may be asked to sign in again with your Apple ID for security reasons).
    find iPhone on iCloud website
  4. Click All Devices at the top of the screen.
  5. Choose your iPhone from the drop-down list.
    find my iPhone on iCloud website
  6. Click the Erase iPhone button.
erase iPhone on iCloud website

This will delete the iPhone’s passcode and all of its data.

When you set up the device you can restore the data from the latest iCloud backup.

Your settings and accounts will be restored from the iCloud backup you choose.

I have written a more detailed article if you want to know more about how to reset an iPhone passcode without using a computer.

Subscribe to iChimp today!

Get updates and the latest posts on Apple Tech from iChimp – straight to your inbox for FREE.

sign up to iChimp

Use recovery mode via iTunes or Finder

This method only works if you have previously connected your iPhone to your computer and backed it up using Finder or iTunes. You don’t need to worry about your Apple ID or iPhone password when using this method.

Step 1: Put your device into recovery mode so you can reset the passcode on your device.

Step 2: Remove the passcode and restore your data

If you have a Mac with macOS Catalina 10.15 or newer use Finder.

 macOS Catalina 10.15 or newer Finder
  1. Open Finder on your Mac
  2. If you have previously synced your phone with the Mac you won’t be asked for the passcode. Otherwise, you will be asked for the passcode so the Mac can be trusted.  In these circumstances, you won’t be able to use this method and you should try one of the others.
  3. In the locations area of Finder click your iPhone
  4. When you see the option to Restore or Update, choose Restore.
  5. The Finder will download software for your phone. If it takes more than 15 minutes, your iPhone will exit recovery mode and you’ll need to repeat the steps to go back into it again.
  6. Choose the latest backup to restore.
  7. Your passcode will be removed and your data will be restored from the backup.

If you have macOS Mojave 10.14 or earlier or older, or a PC, use iTunes.

macOS Mojave 10.14 or older, or a PC, use iTunes
  1. Open iTunes
  2. If you have synced your phone with the computer before you won’t be asked for the passcode. However, if it is a computer you have never synced with previously you will be asked for the passcode so the computer can be trusted.  As you don’t know the passcode you won’t be able to use iTunes and you should try one of the other methods.
  3. Wait for iTunes to sync with your device.
  4. Once synced, click Restore iPhone.
  5. When finished, the iOS setup screen should pop up on your phone.
  6. Tap on Restore from iTunes backup on your iPhone.
  7. Choose the latest backup to restore from.
  8. Your data will be restored from iTunes using the backup and your passcode will be removed.

Bypass iPhone passcode using tools without data loss

If you want to reset a passcode you can’t recall without losing your data the best solution is to use a data recovery tool. This will mean you don’t lose your information from your device as it will be restored after the reset.

I found the paid tools best, but I also give a free method to restore your data after a PIN reset.

To find out what to do if you forgot your iPhone passcode without a restore.

Option 1: Paid passcode reset and data recovery solutions (high success rate)

Passcode removal and data recovery tools compared
SolutionRatingPurpose
#1 LockWiper★★★★★Removes locks such as passcode, Face ID,  Apple ID, MDM lock, & screen time lock
#2 D-Back iPhone Data Recovery★★★★★Recovers erased data from an iOS device, iTunes, or iCloud – including photos, messages, and more…

#3 Ultdata

★★★★Recovers 35 deleted file types from iOS devices, iTunes, or iCloud backups

In order to reset iPhone – without passcode details – and recover your data you need 2 things:

  1. A software tool to unlock screen passcode such as LockWiper or by using the standard Apple process.
  2. A data recovery tool to scan your iOS device and recover the data.

It’s best to try and backup or recover the data before performing the passcode reset. This gives the greatest chance of success and retaining the important information on your device. If this is not possible then you can attempt the data recovery after the reset has been completed.

LockWiper lock removal tool
LockWiper iCloud Unlock

LockWiper is a passcode removal tool that works if your face ID or Touch ID won’t be accepted, if you have a broken screen, or if you have simply been locked out after too many attempts.

It works in 3 simple steps using very intuitive software:

  1. Connect your device to your computer
  2. Select unlock screen passcode
  3. The lock is removed

It should work well in conjunction with D-Back iPhone Data Recovery. Use D-Back to extract the data first, then use LockWiper to remove the passcode. I would advise trying to recover the data using D-Back iPhone Data Recovery before removing the passcode, if possible, as it will have the greatest chance of recovering and saving your data.

The software creators offer a trial version that lets you try before buying.

It is highly regarded with customers saying things like:

I highly recommend iMyFone LockWiper. The tool is easy to use (even for people who don’t know any tech) and allows you to quickly remove the Apple ID and screen lock on your device.

Worked great for half my problem, however, my iPad was iCloud locked so I could not complete the recovery. iMyFone refunded my money hassle-free. great company and easy to deal with.

Step 1: Go to the website and click Buy Now

LockWiper website

Step 2: Select the basic plan as it is suitable for most people and is the cheapest.

lockwiper plans

Step 3: Check out and pay.

lockwiper checkout

Step 4: After you purchase the software make sure to cancel the yearly re-occurring transaction or you will be charged again after 12 months.

D-Back iPhone data recovery tool
D-Back

D-Back is a data recovery program that is worth considering if you have been forced to wipe your iPhone to reset the passcode and don’t have a backup. 

It allows you to restore data from the device using a deep scan via its easy to use interface, including:

Messages & iMessages
Contacts
Photos & App photos
Videos & App videos
WhatsApp messages & attachments
Kik messages & attachments
WeChat messages & attachments
Viber messages & attachments
Line messages & attachments
Notes & attachments
Call history
Voice memos
Calendar
Reminders
Safari bookmarks & history

They offer a trial version that lets you try and recover data before buying. The trial version only allows you to preview lost data, but with the paid version, you can recover and save the lost data to your computer.

It is highly regarded with customers saying things like:

I cannot recommend this program enough!! After my phone died during an update it got stuck in recovery mode. Both Apple and Geek Squad told me there was absolutely nothing I could do and I had to restart it in factory mode and lose everything. They said my only option was to send my phone out to a company who quoted me $2000 to *maybe* get my stuff back. After a quick Google search my husband found iMyFone and I’ll admit I thought it sounded sketchy and too be good to be true, but it really worked. Losing all your phone data can be devastating, but this program can get it back for you. Don’t listen to the “geniuses” and download now. Best money I ever spent!!

Step 1: Go to the website and click Buy Now

d-back download page

Step 2: Pick the version you want. I suggest the basic plan as it is best for a one-off recovery and it is also the cheapest.

d-back plans

Step 3: Pay and check out

d-back checkout

Step 4: After you purchase the software make sure to cancel the yearly re-occurring transaction or you will be charged again after 12 months.

Ultdata data recovery tool
ultdata

Ultdata is another app that allows you to restore lost data from your iPhone.

I haven’t tested this tool myself but it is highly regarded online with a straightforward and intuitive interface.

They claim it can allow you to restore things like pictures, camera rolls, reminders, notes, videos, calendars, contacts, call history, and more…

It can recover data from almost all iOS devices from the iPhone 3G all the way up to the latest versions. As well as iDevices it can also recover data direct from iTunes and iCloud backups.

Overall, it should be a good way to rescue your data from your device.

You do need to have a computer (Mac or PC) to use it tho – so if you can’t get access to one this option may not be suitable.

There is a free trial with some limited functionality. It is worth downloading and giving it a try to see if will allow you to recover the data you need before resetting your device.

If you think it will fulfill your needs then you can buy and download a full version that will allow you to do exactly what you want. It currently costs $59.95.

If you prefer a free solution then you should try the iOS passcode hack described below.

Option 2: Free PIN code reset and data recovery solutions (low success rate)

If you forgot your passcode and want to keep your data without having a backup, you could try to hack iOS to bypass it. This is an unofficial method and it must be done at your own risk with the understanding it may not work. However, it is a good option as a last resort…

…but, it will only work if you have a PC (not a Mac) to install all the software on.

You can see how this method works in the video (below). Beneath the video is step-by-step instructions describing exactly what to do.

Please note:

I have changed the order of the steps used in the video because it isn’t the most efficient way to do it.

The difference is I think you should download all of the software before beginning the unlock process to prevent iTunes ‘timeouts’ and wasting time with multiple reboots of your locked device.

  1. Find out the model number of your device [3] (this article explains how to identify your model
  2. On your PC open a web browser and go to the following website: ipsw.me
  3. Click ‘identify my iOS device’ from the menu on the left
  4. Chose your device type – either iPad, iPhone, or iPod touch
  5. Enter the model number of your device found in step 1.
  6. Click ‘download the latest’ to get the newest firmware for your device and save it on your desktop. It is a very big file so it will take a long time to download.
  7. Next, download this program (make_noerase_ipsw) and unzip it.
  8. Drag the unzipped ‘make_noerase_ipsw’ program to your desktop.
  9. Drag the firmware file downloaded in step 6 onto the ‘make_noerase_ipsw ‘program icon. A new window will open where it will unpack everything. It will take about 10-15 mins to do.
  10. It will create another new file on your desktop which you will use to restore to your device.
  11.  Connect your device to the PC using the lightning or 30-pin cable charging cable.
  12. While your device is connected, put it into “recovery mode“. Find out how to put your Apple device into recovery mode.
  13. iTunes will open automatically, if not open it by clicking the icon.
  14. It should ask you about putting your devices into recovery mode. Hold the shift button down and click the ‘Restore iPhone’ button.
  15. A file manager window will open.
  16. Go to the desktop and find the new file that was created in step 10 and double-click it so it runs.
  17. Click restore and wait around 10-15 mins for the new firmware to upload via iTunes. Your device should show the Apple logo with a file progress bar.
  18. It will then reboot and iTunes will say the device is reset to factory settings (but your data should be safe).
  19. Once rebooted you should be able to access the device without needing to use a passcode.

How to unlock specific phone models

Unlocking your iPhone when you don’t know your passcode can be difficult, especially when the instructions vary from model to model.

Below, you will find links to detailed instructions for unlocking each model of iPhone. Whether you have an iPhone 7, an iPhone 8, an iPhone X, or any other model, I will explain the steps you need to take to get your device back up and running.

I encourage you to follow the instructions closely, as the steps may differ depending on the model of phone you have.

If you have an Apple tablet, you can also find out how to unlock your iPad without passcode.

FAQ’s

Is there a secret PIN code to unlock any iPhone?

There are a number of articles online that appear to claim there is a secret passcode that can unlock any iPhone. The idea is appealing because is it allows you access to any device without having to reset the passcode which is handy if you forget it.

The truth is no such secret passcode exists.

If you read the articles you will notice that there is no secret code and instead, you should use the official unlocking methods.

Why is my data erased when I change my PIN?

Apple makes the passcode reset difficult on purpose.  It is a security feature to prevent your data from getting into someone else hands, for example, if your device is stolen.

In fact, the security on iOS is now so advanced that the FBI had to pay $1.3 million to crack it.

It is a huge inconvenience but at least you know your data is safe if your device is stolen. I realize this isn’t much comfort if you have simply forgotten your passcode, but until Apple comes up with a simpler solution then this is the way it is.

Always check your last iPhone backup to make sure it worked so you have a copy of your data.

Can I reset my forgotten code with my Apple ID?

No, you can’t reset the iPhone passcode by using your Apple ID. The Apple ID and iPhone passcode are independent security measures so you can’t reset one from the other.

Can I reset my device's PIN code using Touch ID?

You can’t reset a forgotten iPhone passcode using Touch ID but you can unlock it and back it up, wipe it, reset the passcode, then restore the data from the backup.

The easiest method is when iCloud and Find My iPhone is enabled:

  1. Do an iCloud backup.
  2. Remote Wipe using Find My iPhone
  3. Reactivate the phone and restore it from the iCloud backup.

If you don’t use iCloud or don’t remember your iCloud password, then you need to connect the device to a PC or a Mac with macOS Mojave 10.14 or earlier on it and do the following:

  1. Back up your data through iTunes.
  2. Restore the phone from iTunes.
  3. Restore the data using the iTunes backup you made.

Will Apple reset my passcode?

No, Apple will not unlock an iPhone passcode for you, although they will help you go through the steps to reset, erase, and recover it. This can be done in-store or via phone.

You should expect to be asked to prove you are the owner of the device so bring along your purchase receipt.

You must also be careful not to confuse SIM unlocking iPhone with the passcode reset process.

How do I set a new PIN on my Apple phone?

When you first set up your iPhone one of the steps in the process is adding a passcode. By default, this is a 6 digit code but this can be changed to:

  • custom alphanumeric code
  • custom numeric code
  • 4-digit numeric code
  • or no code at all

If you have no passcode and would like to add it at a later date you should:

  1. Open your device
  2. Tap Settings
  3. Tap Face ID & Passcode
  4. Tap’ Turn Passcode On’
  5. If you prefer a different passcode type from the standard 6 digits then tap ‘Passcode Options’ at the bottom and select the code type you prefer.
  6. Create and confirm your new code. It’s possible that you will be prompted to enter your Apple ID and password. If so, enter them then hit ‘Continue’.

Do you have any tips to help me remember my password?

Firstly, try to avoid any obvious numbers like birthdays, anniversaries, or the last 4 digits of your phone number when creating a password.

Instead, a good idea is to spell a word or phrase using numbers to create a secure password.

How?

Well, if you look at the keypad you will notice 2 is ABC, 3 is DEF, 4 if GHI, and so on. So if you wanted to use the first 4 letters of your name and your name is Kevin the pin would be 5384:

5 (JKL) 3 (DEF) 8 (TUV) 4 (GHI)

Alternatively use the first letters from your favorite song or use a movie title:

So if your favorite song is Seal’s Kiss from a Rose, your PIN would be 5 (JKL), 3 (DEF), 2 (ABC), 7 (PQRS).

If you like Lord othe Rings your PIN would be 5 (JKL), 6(MNO), 8 (TUV) 7 (PQRS).

This technique is useful for any length of password – 4, 6, or more numbers – and makes it much simpler to recall very long sequences that you may need for things such as online banking.

Can iPhone use pattern unlock?

A standard iPhone running iOS can’t use pattern unlocking.

However, you can jailbreak your phone and install the Android Lock app from the Cydia store. This allows you to use pattern unlocking.

Be careful if you choose to do this as jailbreaking iPhone invalidates the warranty.

To find out more, see the iPhone pattern unlock guide.

Affiliate statement

If you click a link to go through to a provider, we may get paid. This only happens if you buy a service. This is what funds us, and keeps us free to use. For a more detailed explanation see our affiliate disclosure.

17 thoughts on “What to do when you forgot your iPhone passcode (my tried and tested fixes)”

  1. Jon tano and anyone else, have you recovered your data from a locked iPhone where the passcode was forgotten… if so what process did you follow.

  2. Hello!
    I was able to follow all the steps to hacking my iPod without a back up. However, once it restored, my iPod (5th generation) still required a password…..did I do something wrong?

  3. Hi,

    My iPhone 8plus got disabled as forgot my passcode. The screen says iPhone is Disabled, connect to iTunes. When I try to connect, it does not do anything. Reached out to Apple but no help due to security reasons. Is there any way I can enable my phone without losing data? Appreciate your help.

  4. Hi there. My son has forgotten his passcode on an iPhone 7. We reset it to factory settings and then downloaded the back up from the cloud. He was able to reset his thumb setting- but the old passcode is still in place which he can’t remember! Therefore he has quickly got disabled again. Can we over-ride this?

  5. The tool (Make no erase) cannot extract the firmware, I try several times with different firmware but no success

  6. Im trying ti reset iPhone passcode WITHOUT erasing, deleting, or losing data

    this is not happening :
    ‘make_noerase_ipsw ‘program is not creating another new file
    it says “KeyError: ‘RestoreRamDisks’ after a few moments
    Can you help save my phone?

  7. Used Option 2 to try and open up old Ipad with forgotten passcode in order to reuse photos. This process operated exactly as described right through to the iPad apparently restoring, closing down and rebooting, but when it opened up again the passcode was still active! Any thoughts please?

  8. Tried Option 2 in “How to reset and unlock your passcode if YOU DON’T have a backup”. I ended up on the iPhone is disabled screen . My device is an iPhone 4s. I first tried the 9.3.6 ipsw then the 9.3.5 ipsw and ended up at the same point both times.

  9. I want to unlock my iPhone 5s
    I can’t remember my passcode and i cant remember my Apple ID and password
    If i restore my phone using iTunes, will is ask for my Apple ID and password after restore?
    I need urgent reply
    Thanks

  10. Doesn’t work. Ok until step 10 – I drag the files together on the desktop and a window opens. Files unpack ok but after 10 minutes or so it shows 3 Tracebacks and then a line – Keyerror: ‘Restore RamDisks’ Press enter to exit. I press enter and no new file has been created, so that is the end of that. Real pity as every other ‘fix’ I have tried has done nothing whatsoever and I was hoping this one would be different.

    1. It happened the same to me. Seems the developer of the program “‘make_noerase_ipsw” since iOS 11 doesn’t make anymore efforts to support this program. Maybe that’s the reason. My problem is that on a broken screen of my iPhone with installed iOS 13.1.3 I tried over 10 times to insert my 4 digit pincode. As a result I’ve got the iPhone disabled, connect to iTunes.
      Unfortunately I didn’t make any recent backup and all that I want is to backup my data somehow and then restore a new iPhone from this backup. If there is any update please let me know

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top