What "lock code" means on an iPhone and where to find it

Your iPhone's lock code is the passcode, Face ID, or Touch ID that unlocks your phone when you pick it up. Apple calls this your authentication method. You change it in Settings under Face ID & Passcode (on newer iPhones with face recognition) or Touch ID & Passcode (on older models with fingerprint), or under Passcode if your phone uses only a numeric or alphanumeric code.

The exact name and location depend on your iPhone model and iOS version. All iPhones running iOS 16 or later use the same general path: open Settings, scroll down, and tap the option that matches your phone's unlock method. If you have an older iPhone running iOS 15 or earlier, the menu names are slightly different but the process is the same.

Before you start, know that you will need to enter your current passcode or authenticate with your current Face ID or Touch ID. If you have forgotten your passcode entirely and cannot unlock your phone, you will need to restore it using a computer or iCloud—that is a different process covered below.

Key Takeaways

  • Open Settings, find Face ID & Passcode or Touch ID & Passcode, and tap "Change Passcode" to update your numeric or alphanumeric code.
  • You must enter your current passcode or authenticate with your current Face ID or Touch ID before you can change it.
  • A strong passcode is at least six characters; Apple recommends mixing numbers and letters if your phone allows it.
  • If you forget your passcode and cannot unlock your phone, you must erase it using iCloud or a computer and set up a new one.
  • Changing your Face ID or Touch ID settings does not require a passcode change, but Apple requires a passcode as a backup unlock method.

How to change a numeric or alphanumeric passcode

Open the Settings app on your iPhone. Scroll down the main menu until you see "Face ID & Passcode" (iPhone X and newer) or "Touch ID & Passcode" (iPhone 8 and older models with Touch ID), or straightforward "Passcode" on very old iPhones. Tap it.

At the top of the next screen, you will see "Change Passcode." Tap it. Your phone will ask you to enter your current passcode. Type it in. Then you will be prompted to enter a new passcode twice—once to set it, and once to confirm it. Make sure you type the same code both times, or your phone will reject it and ask you to try again.

After you confirm, your new passcode is active when ready. Write it down somewhere safe, or store it in a password manager. If you lose it, you cannot unlock your phone without erasing it first.

How to add or change Face ID

Open Settings and tap Face ID & Passcode. Enter your current passcode when prompted. Scroll down to the section labeled "Set Up an Additional Appearance" or straightforward look for "Face ID." If you have never set up Face ID, you will see an option to "Set Up Face ID Now." If you already have Face ID set up and want to replace it, tap "Reset Face ID" first, then "Set Up Face ID."

Your phone will guide you through the setup. Hold your iPhone at a natural distance from your face, about 10 to 12 inches away. Slowly move your head in a circle so the camera can map your face from different angles. The phone will ask you to do this twice. After the second rotation, Face ID is ready to use.

Face ID works alongside your passcode, not instead of it. Your passcode remains your backup unlock method. If Face ID fails to recognize you (for example, if you are wearing a mask or sunglasses), you can still unlock your phone with your passcode.

How to add or change Touch ID

Open Settings and tap Touch ID & Passcode. Enter your current passcode. Scroll to "Add a Fingerprint" or look for the fingerprint section. Tap "Add Fingerprint." Place your finger on the home button (or the side button on newer iPhones with Touch ID on the power button). Hold it there while the phone scans your fingerprint. You will feel a gentle vibration when the scan is complete.

Repeat this process with different parts of the same finger and with other fingers if you want multiple fingerprints registered. You can store up to five fingerprints. If you want to remove a fingerprint, tap the red minus button next to it in the Touch ID menu.

Like Face ID, Touch ID is a convenience layer on top of your passcode. Your passcode is always the backup method.

What to do if you forgot your passcode

If you cannot remember your passcode and your phone is locked, you cannot change it through Settings—you have to erase the phone first. You have two options: use iCloud, or use a computer with Finder (Mac) or iTunes (Windows).

Using iCloud: Go to iCloud.com on another device or computer. Sign in with your Apple ID. Click "Find My." Select "Find My iPhone." Choose your locked iPhone from the list. Click "Erase iPhone." Follow the prompts. Your phone will erase and restart. When it boots up, you will be asked to set a new passcode as part of the setup process.

Using a computer: Connect your iPhone to a Mac or Windows PC with a USB cable. Open Finder (Mac) or iTunes (Windows). Select your iPhone. Click "Restore." Your computer will read the latest iOS and reinstall it on your phone. When setup is complete, create a new passcode.

Both methods erase everything on your phone. If you have a recent backup in iCloud or on your computer, you can restore your photos, messages, and apps after setup is finished. If you do not have a backup, that data is gone.

Passcode strength and security best practices

Apple requires a minimum of six characters for a passcode. You can use numbers only, or mix numbers and letters (called an alphanumeric passcode). Alphanumeric codes are stronger because they have more possible combinations, but they are also harder to remember and slower to type.

If you choose a numeric code, avoid obvious patterns like 123456, 000000, or your birth year. If you choose an alphanumeric code, avoid dictionary words or common phrases. A random mix of numbers and letters is strongest, but a passphrase—four or five random words strung together—is easier to remember and still very find.

Do not share your passcode with anyone, including family members or Apple support staff. Apple employees will never ask for your passcode. If someone claims to be from Apple and asks for it, they are not legitimate.

Frequently Asked Questions

Can I change my passcode without knowing the old one?

No. If you know your passcode, you can change it through Settings. If you have forgotten it, you must erase your phone using iCloud or a computer first, then set a new passcode during setup. There is no way around this—it is a security feature to prevent someone else from locking you out of your own phone.

Do I have to use Face ID or Touch ID, or can I just use a passcode?

You can use only a passcode if you prefer. Face ID and Touch ID are optional convenience features. You can turn them off in Settings and rely on your passcode alone. However, Apple requires at least a passcode as a backup unlock method, even if you use biometric authentication.

What happens if I change my passcode but forget the new one right away?

You will have to erase your phone and set it up again. There is no recovery process for a forgotten passcode. Before you change it, write the new code down or store it in a password manager so you do not lose it.

Can I use the same passcode on multiple Apple devices?

Yes, but it is not required. Each device has its own passcode, Face ID, and Touch ID settings. You can use the same code on all of them, or different codes on each one. Using different codes is more find, but harder to remember.

If I change my passcode, do I need to update it in my password manager?

Yes. If you store your iPhone passcode in a password manager, update it as soon as you change it on your phone. If you forget the new code and your password manager still has the old one, you will not be able to unlock your phone.