You can unlock a forgotten iPhone passcode using a computer and Apple's recovery tools, but the method depends on whether you have a backup and whether Find My iPhone is turned on

If you've forgotten your iPhone passcode, you have three main routes: using iCloud's Find My iPhone feature, restoring through iTunes or Finder on a Mac or Windows computer, or taking it to an Apple Store. The computer-based methods erase your phone and restore it from a backup, so they work best if you've been backing up regularly. If you don't have a backup, you'll get a blank phone after unlocking it.

The fastest route is usually Find My iPhone through iCloud.com, which can erase your passcode without needing a computer at all—but if you're already at your computer, using iTunes (Windows or older Mac) or Finder (newer Mac) gives you more control over the restore process and lets you choose which backup to restore from.

Key Takeaways

  • Find My iPhone on iCloud.com is the fastest method if you remember your Apple ID password, and it works from any web browser without needing iTunes or Finder.
  • iTunes (Windows and older Mac) or Finder (Mac with macOS Catalina or newer) can unlock your iPhone but will erase it, so you'll need to restore from a backup afterward.
  • You must have either your Apple ID password or a previous backup file saved on your computer to unlock the phone—there is no way around this security requirement.
  • If your iPhone is not backed up and you don't remember your Apple ID password, Apple Store is your only option, and they will erase the phone.
  • Recovery mode (the method using a cable and computer) takes 20 to 40 minutes and requires your Apple ID password to reactivate the phone after the erase.

Using Find My iPhone from iCloud.com (fastest method)

Go to iCloud.com in any web browser on your computer, sign in with your Apple ID and password, and click Find My iPhone. Select your iPhone from the device list. Click the circle icon next to your phone's name, then choose "Erase iPhone." This erases your passcode and all data on the phone.

After the erase completes (usually within a few minutes), your iPhone will restart and show the setup screen. You'll need your Apple ID password to reactivate it. Once you sign back in, you can restore from a backup if you have one saved to iCloud, or set up the phone as new.

This method works only if Find My iPhone was turned on before you forgot the passcode. If it wasn't, you'll need to use iTunes or Finder instead.

Using Finder on Mac (macOS Catalina or newer)

Connect your iPhone to your Mac with a USB cable. Open Finder and click your iPhone's name in the sidebar under Locations. Click "General" at the top, then click "Restore." Finder will read the current iOS version and erase your phone, removing the passcode in the process.

When the restore finishes, your iPhone will restart and show the setup screen. Sign in with your Apple ID password. You'll then see the option to restore from a Time Machine backup or iCloud backup. If you have a backup file on your Mac, Finder will show it in the list—select it to restore your data.

The whole process takes 20 to 40 minutes depending on your internet speed and how much data is being restored. Your phone must stay connected to your Mac until the restore is complete.

Using iTunes on Windows or older Mac

Connect your iPhone to your computer with a USB cable and open iTunes. Your iPhone should appear in the top left corner. Click it, then click the "Summary" tab. Click "Restore iPhone" and confirm the action. iTunes will read iOS and erase your phone, removing the passcode.

When the erase finishes, your iPhone will restart and show the setup screen. Sign in with your Apple ID password. iTunes will then show you available backups—select one to restore your data, or set up as new if you don't have a backup.

This method works on Windows computers with iTunes installed, and on Mac computers running macOS Mojave or earlier. If you're on a newer Mac, use Finder instead.

Putting your iPhone into recovery mode (manual method)

If Finder or iTunes doesn't recognize your iPhone, you can force it into recovery mode. The steps vary by iPhone model. For iPhone 8 and newer: quickly press and release the Volume Up button, quickly press and release the Volume Down button, then press and hold the Side button until the recovery screen appears. For iPhone 7 and 7 Plus: hold both the Volume Down button and the Top (or Side) button until the recovery screen appears. For iPhone 6s and earlier: hold the Home button and the Top (or Side) button together until the recovery screen appears.

Once the recovery screen appears, your computer will prompt you to restore or update. Choose "Restore," and your computer will erase the phone and remove the passcode. You'll need your Apple ID password to reactivate the phone after the restore completes.

Recovery mode is useful when your iPhone won't respond to normal commands, but it takes longer than the standard restore method and carries the same requirement: you must know your Apple ID password to finish setup.

What happens if you don't have a backup or your Apple ID password

If you've never backed up your iPhone and you don't remember your Apple ID password, a computer-based unlock will erase your phone and you'll have no way to restore your data. In this situation, your only option is to visit an Apple Store. They can verify your identity and help you reset your Apple ID password, then unlock the phone.

If you do remember your Apple ID password but have no backup, you can still unlock the phone using any of the methods above—you'll just get a blank iPhone after setup, and you'll need to restore your apps and data manually from the App Store or from cloud services like Google Drive or OneDrive.

When to take your iPhone to an Apple Store instead

Visit an Apple Store if your iPhone is not recognized by your computer, if you don't remember your Apple ID password and can't reset it, or if you're not comfortable using recovery mode. Apple can unlock your phone, but they will erase it in the process. Bring a photo ID and be prepared to verify your identity as the phone's owner.

Apple Store service is free for passcode unlocks, but you may need to make an appointment. Wait times vary by location, but you can usually get an appointment within a few days. If your iPhone has hardware damage that's preventing it from connecting to a computer, Apple can diagnose that too, though repairs may cost money.

Frequently Asked Questions

Will unlocking my iPhone from a computer delete my photos and messages?

Yes, all methods that unlock a forgotten passcode erase the entire phone. If you have an iCloud or iTunes backup, you can restore your photos, messages, and apps after unlocking. If you don't have a backup, that data is gone.

Do I need to know my Apple ID password to unlock my iPhone?

Yes. After you erase the passcode, your iPhone will ask for your Apple ID password during setup. If you don't remember it, you can reset it at iforgot.apple.com before you start the unlock process.

Can I unlock my iPhone without erasing it?

No. There is no way to remove a passcode without erasing the phone—that's a security feature. Any method that removes the passcode also erases all data on the device.

How long does it take to unlock an iPhone from a computer?

Using Find My iPhone on iCloud.com takes 5 to 10 minutes. Using Finder or iTunes takes 20 to 40 minutes, depending on your internet speed and how much data you're restoring from a backup.

What if my computer doesn't recognize my iPhone when I plug it in?

Try a different USB cable or a different port on your computer. If that doesn't work, restart both your computer and iPhone, then try again. If your iPhone still isn't recognized, put it into recovery mode manually using the button combination for your model, or visit an Apple Store.