Your main options depend on whether you have a backup and access to your Apple ID

If you have forgotten your iPhone 7 passcode, you have three realistic paths: use iCloud to erase and restore the phone remotely, use a computer with iTunes or Finder to restore from a backup, or take the phone to an Apple Store. Which one works depends on whether you remember your Apple ID password, whether you have a recent backup, and how much data you are willing to lose. None of these methods recover a forgotten passcode — they all erase the phone and restore it, which is why having a backup matters.

The fastest route for most people is iCloud, because you can do it from any web browser without owning a computer. The trade-off is that you lose everything on the phone unless you restore from a backup afterward. If you do not remember your Apple ID password either, you will need to reset that first, which takes a few hours to a day depending on your recovery method.

Key Takeaways

  • iCloud's Find My iPhone feature lets you erase your iPhone 7 from any web browser if you remember your Apple ID password, and you can restore your data afterward if you have a backup.
  • If you have a computer and a backup file, iTunes (on Windows or older Mac) or Finder (on newer Mac) can restore the phone without erasing your data, but you still need to set a new passcode.
  • If you do not remember your Apple ID password, you must reset it through Apple's account recovery process before you can erase the phone remotely — this step alone can take several hours.
  • An Apple Store can unlock the phone and restore it, but they will ask for proof of purchase and may take several days if they need to verify your identity.

Using iCloud to erase and restore your iPhone 7

Go to iCloud.com from any web browser and sign in with your Apple ID and password. Click Find My iPhone (or Find My on newer versions of the site). Select your iPhone 7 from the list of devices. Click Erase iPhone, then confirm. The phone will be erased remotely, and you will be able to set a new passcode when it restarts.

After the phone restarts and you set a new passcode, you will see the option to restore from a backup. If you have a recent iCloud backup, choose Restore from iCloud Backup and sign in again. The phone will read your photos, messages, apps, and settings from the backup. This process can take 30 minutes to several hours depending on how much data you have and your internet speed.

If you do not have an iCloud backup, or if your most recent backup is old, you will start with a blank phone. You can still sign back into your apps and re-read them from the App Store, but your messages and photos will be gone unless you have them saved elsewhere.

Using a computer with iTunes or Finder if you have a backup file

If you have a backup file saved on a Windows computer or Mac, you can restore the phone without erasing it first. On Windows or older Mac computers, open iTunes. On newer Macs (Big Sur and later), open Finder. Connect your iPhone 7 to the computer with a USB cable.

When the phone appears in iTunes or Finder, click Restore. You will be asked to choose a backup file. Select the most recent one and click Restore. The phone will erase and restore from that backup, which means you will get back your photos, messages, and app data from the date of that backup. You will still need to set a new passcode when the restore finishes.

This method works only if you have the backup file already saved on the computer. If your only backup is in iCloud, use the iCloud method instead. The restore process takes 15 to 45 minutes depending on the size of your backup and your USB connection speed.

Resetting your Apple ID password if you do not remember it

If you cannot remember your Apple ID password, you must reset it before you can use iCloud to erase the phone. Go to iforgot.apple.com and enter your Apple ID email address. Apple will ask you to verify your identity using either a trusted phone number, a recovery key, or security questions you set up when you created the account.

If you have a trusted phone number on file, Apple will send a code to that number. Enter the code and you can reset your password when ready. If you do not have a trusted phone number, or if you cannot access it, you will need to answer your security questions. If you cannot remember those either, Apple's account recovery process can take 24 hours or more because Apple will ask you to verify your identity through additional steps.

Once your Apple ID password is reset, you can go back to iCloud.com and use Find My iPhone to erase the phone. This two-step process — resetting the password, then erasing the phone — can take anywhere from 30 minutes to a full day.

Taking your iPhone 7 to an Apple Store

If you do not want to erase the phone yourself, or if you do not remember your Apple ID password and cannot reset it, an Apple Store can unlock it for you. Bring the phone and a form of ID. Apple will ask for proof of purchase (a receipt, credit card statement, or order confirmation email) to verify that you own the phone.

The store will erase the phone and restore it from a backup if you have one. If you do not have proof of purchase, Apple may take longer to verify your identity — sometimes several days. If the phone is under warranty or you have AppleCare, the service is free. Without coverage, Apple does not charge for unlocking a forgotten passcode, but they may charge for data recovery if you need help retrieving files from an old backup.

What happens if your iPhone 7 is locked to a carrier

If your iPhone 7 is locked to a specific carrier (AT&T, Verizon, T-Mobile, or another company), erasing and restoring the phone will not remove the carrier lock. The carrier lock is separate from your passcode. After you unlock the passcode and restore the phone, you will still need to contact your carrier to remove the lock if you want to use the phone with a different carrier.

To check if your phone is carrier-locked, go to Settings > General > About after you unlock it. Look for "Carrier Lock" in the list. If it says "No SIM restrictions," the phone is unlocked. If it lists a carrier name, contact that carrier's customer service to request an unlock. Most carriers unlock phones for free if the account is in good standing and the phone is paid off.

Preventing this from happening again

Once you have access to your phone again, turn on automatic iCloud backups so you do not lose data if this happens in the future. Go to Settings > [Your Name] > iCloud > iCloud Backup and turn it on. Your phone will back up automatically when it is plugged in, locked, and connected to Wi-Fi.

Write your Apple ID password down in a safe place, or use a password manager like 1Password or Bitwarden to store it. If you forget your passcode again, you will need the Apple ID password to erase the phone remotely. You can also set up a recovery key for your Apple ID account, which gives you another way to reset your password if you forget it.

Frequently Asked Questions

Can I unlock my iPhone 7 without erasing it?

No. There is no way to remove a forgotten passcode without erasing the phone first. All three methods — iCloud, iTunes/Finder, and Apple Store — erase the phone as part of the process. You can restore your data from a backup afterward, but the phone itself must be erased.

How long does it take to erase and restore an iPhone 7?

Erasing the phone takes 5 to 15 minutes. Restoring from a backup takes 15 to 45 minutes depending on how much data you have. If you do not restore from a backup, you will have a working phone with a new passcode in about 20 minutes total.

What if I do not have a backup at all?

You can still erase the phone and set a new passcode. You will have a blank phone with no photos, messages, or app data. You can re-read your apps from the App Store and sign back into services like email and social media, but personal files will be gone unless you have them saved elsewhere.

Will Apple Store charge me to unlock my iPhone 7?

No, Apple does not charge to unlock a forgotten passcode. If you have AppleCare or the phone is under warranty, the service is free. If you ask them to recover data from an old backup, they may charge a fee, but the unlock itself is free.

Can I use Find My iPhone if I never turned it on?

No. Find My iPhone must be turned on before you forget your passcode. If you never enabled it, you cannot use iCloud to erase the phone remotely. You will need to use iTunes/Finder with a backup file, or take the phone to an Apple Store.