What to do when you're locked out of your iPhone
If you've forgotten your passcode or your iPhone is disabled after too many wrong attempts, you have several ways to regain access. The method that works depends on whether you remember your Apple ID password, whether you have a computer available, and how recently you backed up your device.
The fastest route for most people is using iCloud from another device — it takes about 10 minutes and doesn't require a computer. If you don't remember your Apple ID password, you'll need a Mac or Windows computer and either a USB cable or a wireless connection to your iPhone. In all cases, you'll lose any data that wasn't backed up to iCloud or your computer.
Key Takeaways
- You can unlock your iPhone through iCloud if you remember your Apple ID password, using any web browser on any device.
- If you have a computer, you can use Finder (Mac) or iTunes (Windows) to restore your iPhone without knowing your Apple ID password.
- Recovery mode erases your iPhone completely, so you'll only get back data that was backed up before you got locked out.
- If you set up Face ID or Touch ID, you can still use those to unlock your iPhone even if you've forgotten your passcode.
- After you regain access, you can restore your data from an iCloud backup or a computer backup if one exists.
Unlocking your iPhone through iCloud
This method works if you remember your Apple ID password. Go to iCloud.com from any web browser on any device — a computer, tablet, or another phone. Sign in with your Apple ID and password.
Click Find My (or Find My iPhone on older iCloud layouts). Select your iPhone from the list of devices. Click Find My iPhone or the device name, then choose Erase iPhone. Confirm that you want to erase it. Your iPhone will be wiped and you'll be able to set it up again with a new passcode.
After the erase completes, your iPhone will show the setup screen. You can sign back in with your Apple ID and restore from an iCloud backup if you had one. This entire process takes about 10 minutes.
Using a Mac to unlock your iPhone
If you have a Mac running macOS Monterey or newer, connect your locked iPhone with a USB cable. Open Finder and click your iPhone in the sidebar under Locations.
Click General at the top. You'll see a button that says Restore — click it. Your Mac will download the current iPhone software and erase your device. You don't need to know your Apple ID password for this method, but you will need to sign in with your Apple ID after the restore completes to reactivate your iPhone.
If you're using an older Mac with macOS Big Sur or earlier, use iTunes instead of Finder. The steps are the same: connect your iPhone, find it in iTunes, and click Restore.
Using a Windows computer to unlock your iPhone
Connect your locked iPhone to a Windows computer with a USB cable. Open iTunes (download it from Apple's website if you don't have it). Your iPhone should appear in iTunes — click it.
Click the Summary tab, then click Restore iPhone. iTunes will ask you to confirm. Click Restore again. Your computer will download the current iPhone software and erase your device completely.
After the restore finishes, your iPhone will show the setup screen. Sign in with your Apple ID to reactivate it. If you had an iCloud backup, you can restore your data during setup.
If you don't have a computer or remember your Apple ID password
You have two remaining options. The first is to borrow a computer from someone else and follow the Mac or Windows steps above — you don't need the computer to be yours, and you don't need to know your Apple ID password if you use Finder or iTunes.
The second option is to contact Apple Support directly. They can verify your identity and help you unlock your iPhone remotely. This process takes longer — usually one to two business days — but it's an option if you have no access to a computer and no way to remember your Apple ID password.
Restoring your data after you unlock your iPhone
After your iPhone is erased and you've set it up again, you can get your data back if you had a backup. During the setup process, you'll see a screen that asks Apps & Data. Choose Restore from iCloud Backup if you had iCloud backup turned on before you got locked out.
If you erased your iPhone using a Mac or Windows computer, you can also restore from that computer's backup. Connect your iPhone again after setup and open Finder or iTunes. Click Restore Backup and choose the backup you want to use.
Be aware that you'll only recover data that was backed up before you got locked out. Any photos, messages, or other data created after your last backup will be gone.
Avoiding this problem in the future
Write down your passcode or store it in a password manager you can access from another device. Turn on iCloud backup in Settings > [Your Name] > iCloud > iCloud Backup, and make sure it's set to On. This way, if you get locked out again, you can restore everything through iCloud.
If you use Face ID or Touch ID, enable those features in Settings > Face ID (or Touch ID) & Passcode. You'll still need your passcode for some actions, but you won't have to type it every time you unlock your phone, which reduces the chance you'll forget it.
Frequently Asked Questions
Can I unlock my iPhone without erasing it?
No. If your iPhone is disabled or you've forgotten your passcode, the only way to regain access is to erase it completely. Apple designed it this way for security — if you could unlock it without erasing, anyone with physical access could get into your phone.
What if I don't remember my Apple ID password either?
You can still unlock your iPhone using a Mac or Windows computer with Finder or iTunes — you don't need your Apple ID password for that method. You will need to sign in with your Apple ID after the restore to reactivate your phone, but you can reset your Apple ID password at iforgot.apple.com before you do that.
How long does it take to unlock an iPhone?
Using iCloud takes about 10 minutes. Using a computer takes 15 to 30 minutes depending on your internet speed and which macOS or Windows version you have. Contacting Apple Support takes one to two business days.
Will I lose all my photos and messages?
Only if you didn't have a backup. If you had iCloud backup turned on or had backed up to a computer, you can restore everything during setup. If you had no backup, yes, all your data will be gone.
Do I need the original computer I used to set up my iPhone?
No. You can use any Mac or Windows computer to unlock your iPhone. It doesn't have to be the one you originally set it up with.