The fastest way depends on what phone you have and what you remember

If you've locked yourself out of your phone, the path forward changes based on whether you have an iPhone or Android device, and whether you can access a computer or another device. The quickest routes use your existing accounts — Google on Android, Apple ID on iPhone — rather than factory resets that erase everything. Most phones let you reset the password without losing your data if you act before the device locks you out completely.

The key is that you don't need the original password itself. You need either the email account linked to your phone, or access to a recovery phone number, or both. If you set those up when you first got the phone, you're usually back in within minutes.

Key Takeaways

  • iPhone users can reset a forgotten password through their Apple ID on any computer or another Apple device, without needing the original password.
  • Android users can reset through their Google account from any web browser, and the phone will let you in on the next restart.
  • If you don't remember your Apple ID or Google password either, you can recover those accounts using the email address or phone number you registered with them.
  • A factory reset erases all data on the phone and should be your last option, not your first.
  • If the phone is brand new and still has setup screens showing, you may be able to skip the password entirely by using your account credentials instead.

Resetting an iPhone password through your Apple ID

Go to iCloud.com on any computer or another Apple device and sign in with your Apple ID — the email address you use for iCloud. If you don't remember that password either, click "Forgot Apple ID or password" and follow the recovery steps using your email or phone number. Once you're signed in to iCloud, click "Find My" in the menu.

Select "Find My iPhone" and choose your locked phone from the device list. Click "Erase iPhone" at the top right. This removes the password but keeps your data intact if you have a recent backup. The phone will restart and ask you to sign in with your Apple ID again — use the same credentials you just used on iCloud. Your phone will restore from your backup during setup, and you'll be back to where you were before you forgot the password.

If you don't have access to another Apple device or computer, you can also go to iforgot.apple.com on any web browser and follow the same recovery process for your Apple ID, then use those credentials on your locked phone once it restarts.

Resetting an Android password through your Google account

On your locked Android phone, tap "Forgot password?" or "Forgot PIN?" on the lock screen — the exact wording varies by manufacturer. You'll be asked to enter your Google account email address. Type in the email you used when you set up the phone.

Google will send a verification code to that email address. Check your email on any computer or another device, find the message from Google, and enter the code back into your phone. Once verified, you can set a new password or PIN right there on the lock screen. The phone unlocks when ready, and none of your data is erased.

If you don't remember your Google password, go to accounts.google.com on any web browser, click "Forgot password?", and recover your account using your email or a recovery phone number. Once you've reset your Google password, go back to your locked phone and use those new credentials.

What to do if you don't remember your email or recovery phone number

If you can't access the email address linked to your phone, or you don't remember a recovery phone number you set up, you'll need to contact Apple or Google directly to prove you own the account. Have ready any information you remember: the phone number associated with the account, the last four digits of a credit card you used, or the date you created the account.

For Apple, go to support.apple.com and select "Contact Support." For Google, go to accounts.google.com/signin/recovery and choose "I don't have my recovery email or phone number." Both companies have account recovery teams that can verify your identity through security questions or other methods, though this process takes longer than a standard password reset — sometimes several days.

Resetting a phone that's still in setup mode

If your phone is brand new and still showing the initial setup screens, you may not need to reset anything. Look for an option that says "Sign in with your Google account" or "Sign in with your Apple ID" instead of entering a password. Tap that option and enter your account credentials. The phone will set itself up using your account, and you'll skip the password screen entirely.

This only works if the phone hasn't completed setup yet. Once setup is finished and the phone is locked, you'll need to use one of the account recovery methods above.

Factory reset as a last resort

A factory reset erases everything on your phone — all photos, messages, apps, and settings — and returns it to the state it came in. Do this only if you cannot access your Apple ID or Google account, and you've confirmed with the manufacturer's support team that no other option is available.

On iPhone, hold the top button and either volume button until the power-off slider appears, then release. Press and hold the top button again until you see the recovery mode screen. On a Mac, open Finder, select your phone, and click "Restore." On a Windows computer, open iTunes and click "Restore iPhone."

On Android, the process varies by manufacturer. Most phones let you hold the power button and volume-down button together until the recovery menu appears, then select "Wipe data / factory reset." Check your phone's manual or the manufacturer's website for exact steps, because the button combination is different on some models.

After a factory reset, the phone will ask you to sign in with your Google or Apple account during setup. You'll need those credentials to finish, and your phone will be empty until you restore from a backup.

Preventing this from happening again

Write down your Apple ID or Google email address and store it somewhere safe — not on the phone itself. If you use a password manager, save your account password there. Set up a recovery phone number and recovery email address in your account settings, so you have multiple ways back in if you forget.

Turn on automatic backups: iCloud on iPhone, or Google One on Android. These run in the background and mean that even if you have to factory reset, your data isn't gone — it just takes time to restore.

Frequently Asked Questions

Will resetting my password erase my photos and messages?

No. Resetting through your Apple ID or Google account keeps all your data intact. A factory reset erases everything, but that's a separate, last-resort option. If you have backups turned on, even a factory reset can be restored from backup afterward.

How long does it take to get back into my phone?

If you remember your Apple ID or Google password, usually 5 to 10 minutes. If you need to recover that password too, it depends on which recovery method you use — email codes arrive when ready, but account recovery through Google or Apple support can take days if they need to verify your identity.

Can I use someone else's computer to reset my password?

Yes. You can sign into iCloud.com or Google on any computer, even a friend's or a library computer. Just make sure you sign out when you're done, and don't save your password on that computer.

What if my phone is locked and I can't see the "Forgot password?" button?

On some phones, you have to enter an incorrect password or PIN several times before the recovery option appears. Try entering a wrong password five or six times, and the button should show up. If it doesn't, restart the phone and try again.

Do I need to contact my phone company to unlock my phone?

No. Your phone company handles network locks (which prevent the phone from working on other carriers), not password locks. Password resets go through Apple or Google, not your carrier.