Change your iPhone passcode through Settings

To change your iPhone lock screen password — called a passcode on Apple devices — open the Settings app and go to Face ID & Passcode (or Touch ID & Passcode on older models). You'll enter your current passcode, then select "Change Passcode" and create a new one. The whole process takes about two minutes.

Your lock screen passcode is separate from your Apple ID password. Changing one does not change the other. If you forget your lock screen passcode, you'll need to erase the phone and set it up again, so write down your new passcode somewhere safe before you leave Settings.

Key Takeaways

  • Open Settings, tap Face ID & Passcode (or Touch ID & Passcode), and enter your current passcode to access the change option.
  • You can use a 4-digit, 6-digit, or custom alphanumeric passcode — longer passcodes are harder to guess but take longer to type each time you unlock.
  • Your lock screen passcode is different from your Apple ID password and changing one does not affect the other.
  • If you forget your new passcode before you leave the Settings screen, you can go back and change it again without losing any data.
  • If you forget your passcode after you close Settings, you will have to erase your iPhone and set it up from scratch.

Step-by-step: changing your passcode in Settings

Open the Settings app on your home screen. Scroll down and tap "Face ID & Passcode" if you have an iPhone with Face ID (iPhone X and newer), or "Touch ID & Passcode" if you have an older model with a fingerprint sensor. If you have an even older iPhone without biometric unlock, look for "Passcode" in the main Settings menu.

At the top of the Face ID & Passcode screen, you'll see a field that says "Enter Passcode." Type your current passcode here. This confirms you have permission to change it. Once you enter it correctly, the screen will expand to show more options.

Look for the option labeled "Change Passcode" and tap it. You'll be asked to enter your current passcode one more time — this is a security check. After you enter it, you'll see a field asking for your new passcode. Type the new code you want to use. Then you'll be asked to enter it again to confirm you didn't make a typo. Once both entries match, your new passcode is active immediately.

Choosing between 4-digit, 6-digit, and custom passcodes

When you create a new passcode, iPhone gives you three options. A 4-digit passcode is the quickest to type but the easiest to guess — there are only 10,000 possible combinations. A 6-digit passcode is the default on newer iPhones and offers much better security with 1 million possible combinations, while still being reasonably fast to type.

A custom alphanumeric passcode can include letters, numbers, and symbols, making it far more secure but also slower to enter every time you unlock your phone. If you use your iPhone frequently and security is your main concern, a 6-digit passcode is usually the best balance. If you use it rarely or keep very sensitive information on it, a custom passcode with letters and symbols is worth the extra typing time.

You can change the passcode type each time you update it. If you start with 6 digits and later decide you want 4, you can go back to Face ID & Passcode, tap "Change Passcode," and select a different format.

What to do if you forget your new passcode immediately

If you realize you've entered a passcode you can't remember while you're still in the Settings app, tap "Change Passcode" again. You'll need to enter your current (new) passcode first, but if you just created it moments ago, you should still remember it. Once you enter it, you can create a different passcode right away without losing any data on your phone.

This only works while you're still in Settings. Once you close the app and lock your phone, you cannot change the passcode without erasing the device. That's why it's important to test your new passcode by locking your phone and unlocking it again before you leave Settings — just to be absolutely sure you can remember it.

If you forget your passcode after leaving Settings

If you forget your passcode after you've closed Settings and locked your phone, there is no way to recover it without erasing your iPhone completely. Apple does not have a master override for lock screen passcodes, even if you can prove you own the phone. You'll need to use a computer with iTunes or Finder, or use iCloud's Find My iPhone feature, to erase the device and set it up again from a backup.

Before you erase, make sure you know your Apple ID password — you'll need it to reactivate the phone after erasing. If you don't remember your Apple ID password either, you can reset it at iforgot.apple.com using your recovery email or phone number. The whole process of erasing and restoring from backup typically takes 30 minutes to an hour, depending on how much data is on your phone.

Passcode versus Face ID and Touch ID

Your lock screen passcode is your backup unlock method. Even if you use Face ID or Touch ID every day, your passcode is what you enter when your face or fingerprint won't unlock the phone — for example, if you're wearing a mask, your hands are wet, or the sensor isn't working. You cannot disable your passcode; it's always there as a fallback.

If you want to change only your Face ID or Touch ID settings without touching your passcode, that's a separate option in the same Face ID & Passcode screen. You can add or remove fingerprints, retrain Face ID, or turn biometric unlock off entirely — but your passcode will remain active regardless.

Frequently Asked Questions

Can I use the same passcode I used before?

Yes. iPhone does not prevent you from reusing an old passcode. However, if someone saw your old passcode, changing to a new one is the point — so choosing something different is more secure.

Will changing my passcode erase my photos or data?

No. Changing your lock screen passcode does not affect any data on your phone. Your photos, messages, apps, and settings all stay exactly as they are. Only the code you type to unlock the phone changes.

What if I change my passcode and then forget my Apple ID password too?

You can reset your Apple ID password at iforgot.apple.com without knowing your lock screen passcode. However, if you forget both and then forget your lock screen passcode, you'll need to erase your phone and you'll be asked for your Apple ID password during setup — so make sure you reset it first.

Can I change my passcode from my computer instead of my iPhone?

No. You must change your lock screen passcode directly on the iPhone itself through Settings. You cannot change it remotely from a computer or another device.

How often should I change my passcode?

There's no rule that says you must change it regularly. Change it if you think someone saw it, if you used the same passcode on another device that was compromised, or if you simply want to. Changing it occasionally is good practice, but it's not required.