If you’ve forgotten your iPhone passcode, there is no way to unlock it without erasing it. The good news: if you have a backup, you can get your data back after the reset.

Method 1: Reset from the lock screen (newer iOS)

  1. Enter wrong passcodes until you see iPhone Unavailable or Security Lockout.
  2. Tap Forgot Passcode? (or Erase iPhone) at the bottom.
  3. Sign in with your Apple Account password.
  4. Confirm to erase. The iPhone restarts as new.

This needs the iPhone to be connected to Wi-Fi or mobile data.

Method 2: Recovery mode with a computer

  1. Connect the iPhone to a computer (Finder on Mac, Apple Devices or iTunes on Windows).
  2. Turn the iPhone off, then put it into recovery mode by holding the correct button for your model while connecting (Apple’s page lists each model).
  3. On the computer, choose Restore.
  4. After it restarts, set it up and sign in with your Apple Account.

After the reset

During setup, choose Restore from iCloud Backup (or your computer backup). Anything not backed up is lost.

Avoid “iCloud bypass” and unlock scams. Services promising to unlock any iPhone without the owner’s Apple Account often take money and deliver nothing, or deal in stolen phones.

Forgot your Apple Account password too? See reset your Apple Account password.

This guide was checked in October 2026. Menus and services change, so if something looks different on your phone, check with your provider.

Common questions

Can I unlock my iPhone without losing data?

Not if you forgot the passcode. Apple’s methods erase the iPhone; you restore your data from a backup afterwards.

What do I need to reset a locked iPhone?

Your Apple Account email and password, and either the iPhone’s lock-screen reset option or a computer.

Can a phone repairer unlock my iPhone?

Legitimate repairers use the same Apple methods. Anyone promising to bypass the passcode or Activation Lock without your Apple Account is likely scamming or selling stolen-phone services.

How many wrong attempts before the iPhone locks?

After several wrong attempts the iPhone shows “iPhone Unavailable” with a timer, and eventually offers the reset option.

Sources