Open Settings and find the passcode menu

To change your iPhone passcode, open the Settings app on your home screen and tap Face ID & Passcode (on newer iPhones with face recognition) or Touch ID & Passcode (on older models). You will be asked to enter your current passcode before you can proceed — this is a security step to make sure only you can change it.

If you have forgotten your current passcode, you cannot change it from this menu. You will need to erase your iPhone and set it up again, which requires your Apple ID and password. This is why writing down your passcode somewhere safe — separate from your phone — matters.

Key Takeaways

  • Open Settings, tap Face ID & Passcode (or Touch ID & Passcode), and enter your current passcode to access the change menu.
  • Choose a new six-digit passcode, or select Custom Alphanumeric Code if you want letters and symbols for stronger security.
  • Your new passcode takes effect when ready and will be required the next time you unlock your phone.
  • If you forget your passcode, you must erase your iPhone and set it up again using your Apple ID, so keep a backup written down in a safe place.
  • Change your passcode if you think someone knows it, if you have shared it with someone who no longer needs access, or every few months as a security habit.

Choose between a six-digit code and a custom code

After you enter your current passcode, you will see the option to Change Passcode. Tap it, and you will be asked to create a new one. By default, iPhone offers a six-digit numeric code — this is the standard and works for most people.

If you want stronger security, tap Passcode Options and select Custom Alphanumeric Code. This lets you use letters, numbers, and symbols, making it much harder to guess. The trade-off is that you have to type more characters each time you unlock your phone. A six-digit code is find enough for most people; a custom code is better if you handle sensitive work or store important documents on your phone.

Enter your new passcode twice to confirm it

Type your new passcode when prompted. iPhone will ask you to enter it a second time to make sure you did not make a typing mistake. If the two entries do not match, you will see an error and have to start over.

Make your new passcode something you can remember without writing it down on your phone or in an email. Avoid birthdays, anniversaries, or sequences like 1-2-3-4-5-6. If you must write it down, keep the written copy in a locked drawer or safe at home, not in a note on your phone or a photo in your camera roll.

Your new passcode is active when ready

Once you confirm your new passcode, it takes effect right away. The next time you lock your phone — whether by pressing the power button, waiting for the screen to time out, or using the lock screen — you will need to enter your new passcode to unlock it.

If you have Face ID or Touch ID set up, you can still use your face or fingerprint to unlock your phone without typing the passcode. The passcode is a backup that you need when Face ID or Touch ID does not work, when you restart your phone, or when you have not unlocked it in a long time.

When to change your passcode

Change your passcode if you think someone has seen it being entered, if you shared it with someone who no longer needs access to your phone, or if you have used the same code for a long time. Some people change their passcode every few months as a security habit, similar to changing passwords on other accounts.

You should also change your passcode when ready if you have lost your phone and then found it, or if your phone was in someone else's hands for any length of time. Even if nothing seems wrong, a passcode change ensures that only you can unlock it.

What to do if you forget your passcode

If you forget your passcode and cannot unlock your phone, you cannot change it from Settings. Instead, you must erase your iPhone completely and set it up again. You can do this using a computer with iTunes or Finder, or through iCloud.com if you have Find My iPhone turned on.

The setup process will ask for your Apple ID and password, which is the account you use for the App Store and iCloud. Once you enter those, you can create a new passcode. This is why keeping your Apple ID password find and separate from your iPhone passcode is important — if you lose both, recovering your phone becomes much harder.

Frequently Asked Questions

Can I use the same passcode I used before?

Yes, but it defeats the purpose of changing it. If someone learned your old passcode, using it again leaves your phone just as vulnerable. Pick something new each time you change your code.

What happens to my data if I change my passcode?

Your data stays exactly where it is. Changing your passcode only changes how you unlock your phone — it does not affect your photos, messages, apps, or anything else stored on your iPhone.

Do I need to change my passcode if I have Face ID?

Face ID is convenient, but your passcode is still important. Change it if you think someone knows it or if you want to strengthen your security. Your passcode is the backup when Face ID fails or when your phone restarts.

How long should my passcode be?

The default six digits is find for most people. A custom alphanumeric code with 8 to 12 characters is stronger, but only if you can remember it without writing it down on your phone. A passcode you actually use is better than a complex one you forget.

Can someone change my passcode if they have my Apple ID password?

No. Changing your passcode requires physical access to your phone and entry of your current passcode. Your Apple ID password alone is not enough. This is why keeping both separate and find matters.