Use your backup PIN, pattern, or biometric method if you set one up

The fastest way back into your phone is a backup unlock method you created when you first set up the device. If you registered a fingerprint, face recognition, or a backup PIN during setup, you can use any of those right now without losing data or waiting for account recovery.

On Android, try your fingerprint or face unlock first — these work even if you've forgotten your main password. If those don't work, look for a "Forgot password?" or "Can't access your device?" button on the lock screen. On iPhone, Face ID or Touch ID will unlock the phone if you set them up before you forgot the password.

If you have a backup PIN (a shorter code you created separately from your main password), that will also work when ready. Check your lock screen for a "Use backup PIN" option or similar text.

Key Takeaways

  • Fingerprint, face recognition, or a backup PIN you set up earlier will unlock your phone without losing any data.
  • Android phones show a "Forgot password?" link on the lock screen that starts account recovery in minutes.
  • iPhone requires you to use Find My iPhone or a computer to reset the password, and this process takes longer.
  • Recovery methods depend on whether you remember your Google account password (Android) or Apple ID password (iPhone).
  • Factory reset is the last option and erases all data on the phone — use it only if you cannot recover your account.

Android: Use the "Forgot password?" option on the lock screen

After you enter an incorrect password several times, Android shows a "Forgot password?" button at the bottom of the lock screen. Tap it. The phone will ask you to sign in with your Google account — the email address and password you used to set up the phone originally.

If you remember your Google password, enter it and the phone will unlock. You can then set a new password in Settings. This process takes a few minutes and keeps all your photos, messages, and apps intact.

If you don't remember your Google password, go to accounts.google.com on a computer or another device. Click "Forgot password?" and follow Google's recovery steps, which usually involve confirming your phone number or a backup email address. Once you reset your Google password, return to your phone and use the new password to unlock it.

iPhone: Use Find My iPhone or a computer to reset your password

iPhone does not show a "Forgot password?" button on the lock screen. Instead, you need a computer or another device to reset the phone. Go to iCloud.com and sign in with your Apple ID (the email address you use for iCloud). Click "Find My" and select your iPhone from the list of devices.

Choose "Erase iPhone" to wipe the phone and remove the password. This erases all data, so use this only if you have backups stored in iCloud or on a computer. After the phone erases, you can set it up again and restore your data from the backup.

If you don't remember your Apple ID password, go to iforgot.apple.com and follow Apple's account recovery steps. These usually involve confirming your identity with a phone number, email address, or security questions you answered when you created the account.

Use a computer to unlock Android without losing data

If you have a Windows or Mac computer, you can unlock an Android phone without erasing it. Connect the phone to the computer with a USB cable. On the computer, read and install Android Debug Bridge (ADB), which is a free tool from Google.

Open a command prompt or terminal on the computer and use ADB to remove the password file from the phone. This method requires some technical steps, but it does not erase your data. Search for "ADB unlock Android phone" and follow a guide that matches your phone model, because the exact steps vary.

This approach works best if you are comfortable using a command line. If you are not, the Google account recovery method is simpler and just as safe.

Factory reset as a last resort

If you cannot recover your Google or Apple account, you can force a factory reset by holding specific buttons on the phone. For most Android phones, hold the power button and volume-down button together for 10 to 15 seconds until the recovery menu appears. Use the volume buttons to navigate to "Wipe data / factory reset" and press the power button to confirm.

For iPhone, connect to a computer with iTunes or Finder, put the phone in recovery mode (hold specific buttons depending on your model), and click "Restore." Both methods erase everything on the phone, including photos, messages, and apps.

After the reset, you can set up the phone again and sign in with your Google or Apple account. If you have backups in Google Drive or iCloud, your data will restore automatically. If you don't have backups, the data is permanently gone.

Prevent this from happening again

Write down your Google or Apple ID password and store it somewhere safe — a notebook in a drawer, a password manager like Bitwarden or 1Password, or a trusted family member. Do not store it in a note on the phone itself.

Set up biometric unlock (fingerprint or face recognition) as your primary way to open the phone. This is faster than typing a password and means you will use the password less often, so you are less likely to forget it.

Enable automatic backups to Google Drive (Android) or iCloud (iPhone). If you ever need to factory reset, your photos, contacts, and messages will restore in minutes.

Frequently Asked Questions

Will I lose my photos and messages if I use the "Forgot password?" option?

No. The "Forgot password?" method on Android and the account recovery method on iPhone both unlock the phone without erasing data. Your photos, messages, and apps stay on the phone. You only lose data if you choose to factory reset.

What if I don't remember my Google or Apple ID password either?

Go to accounts.google.com (Google) or iforgot.apple.com (Apple) on a computer. Both companies have recovery options that use your phone number, backup email, or security questions to verify your identity and let you reset the password.

Can I unlock my phone without a computer or another device?

On Android, yes — the "Forgot password?" button on the lock screen works with just your phone and your Google password. On iPhone, you need either a computer with iTunes or Finder, or access to iCloud.com on another device.

How long does it take to recover my account and unlock the phone?

If you remember your Google or Apple ID password, unlocking takes a few minutes. If you need to recover your account password first, it depends on which recovery method Google or Apple asks you to use — usually 15 minutes to an hour, sometimes longer if they need to verify your identity by mail.

Is it safe to use ADB to unlock my Android phone?

Yes, ADB is Google's official tool and is safe to use. The main risk is making a typing mistake in the command, which is why following a guide carefully matters. If you are not comfortable with command-line tools, the "Forgot password?" method is simpler and just as safe.