What you need to know before you start

Your iPhone passcode is the six-digit (or longer) code you enter to unlock your phone. Changing it takes about two minutes and works the same way on any recent iPhone model. You will need to know your current passcode to set a new one — if you have forgotten it, you will need to erase your phone and set it up again, which is a different process.

The steps below work on iPhone models running iOS 15 or newer. If your phone is older, the menu locations might be slightly different, but the basic idea is the same: go to Settings, find the security section, and choose the option to change your code.

Key Takeaways

  • You must know your current passcode before you can change it to a new one.
  • Open Settings, tap Face ID & Passcode (or Touch ID & Passcode on older models), and enter your current code.
  • Select "Change Passcode" and enter your current code again, then type your new code twice.
  • Your new passcode takes effect when ready and you will use it the next time you lock and unlock your phone.

Open Settings and find the passcode menu

Tap the Settings app on your home screen — it looks like a gray gear. Scroll down until you see "Face ID & Passcode" (on newer iPhones with face recognition) or "Touch ID & Passcode" (on older models with fingerprint). Tap it.

Your phone will ask you to enter your current passcode. Type the six digits (or however many digits your code is) and tap the checkmark or press Enter. This step confirms you are the person who owns the phone, so Apple will not let you skip it.

Select "Change Passcode" from the menu

Once you have entered your current passcode, you will see a list of options. Look for "Change Passcode" near the top of the screen and tap it. Your phone will ask you to enter your current passcode one more time — type it in again.

This second request is a safety measure. Even if someone picks up your unlocked phone, they cannot change your passcode without knowing the old one first.

Enter your new passcode twice

After you enter your current code the second time, a text box will appear asking you to "Enter a new passcode." Type the new code you want to use. It can be six digits, or you can make it longer by tapping "Passcode Options" and choosing a custom length.

After you type your new code once, the screen will ask you to enter it again to confirm. Type the same code a second time. If the two entries match, your phone will show a confirmation message and return to the Settings menu. Your new passcode is now active.

What happens if you make a mistake

If you type your new passcode differently the second time, your phone will tell you the codes do not match and ask you to try again. straightforward type your new code once more, then confirm it a second time. There is no penalty for getting it wrong — you can try as many times as you need.

If you enter your current passcode incorrectly at the beginning, your phone will show an error and ask you to try again. After several wrong attempts in a row, your phone may add a delay before letting you try again, but this is a temporary lock — it clears after a few minutes.

Make your new passcode something you will remember

Choose a code that is not a birthday, anniversary, or other number someone could guess from your social media. Avoid sequences like 1-2-3-4-5-6 or repeating digits like 1-1-1-1-1-1. Write it down in a safe place — a notebook at home, not in a note on your phone — until you have used it enough times that it becomes automatic.

If you want extra security, tap "Passcode Options" before you confirm your new code and choose "Custom Alphanumeric Code." This lets you use letters and numbers together, which is harder to guess than numbers alone. The tradeoff is that you have to type more characters each time you unlock your phone.

Your new passcode takes effect right away

Once you see the confirmation message, your old passcode no longer works. The next time your phone locks — either because you pressed the power button or because it timed out — you will use your new code to unlock it. There is no waiting period or restart required.

If you change your passcode and then when ready try to unlock your phone, make sure you are typing the new code, not the old one. It is straightforward to slip back into muscle memory for a few hours.

Frequently Asked Questions

What if I forgot my current passcode?

You cannot change your passcode without knowing the current one. You will need to erase your iPhone and set it up again using your Apple ID and password. This is a longer process that requires a computer or another device. Contact Apple Support or visit an Apple Store if you need help with this step.

Can I use the same passcode I used before?

Yes, technically you can, but there is no reason to. If you want to keep using the same code, you do not need to change it at all. The point of changing your passcode is to use something new that nobody else has seen you type.

How often should I change my passcode?

There is no rule that says you must change it. Change it if you think someone saw you type it, if you used it on a shared device, or if you just want a fresh code. Many people change theirs once or twice a year as a habit, but it is not required.

Will changing my passcode affect my Face ID or Touch ID?

No. Your Face ID or Touch ID will continue to work exactly as before. Changing your passcode only affects the six-digit (or longer) code you type when face or fingerprint recognition does not work. You do not need to re-set up your biometric unlock.

What if my phone is locked and I cannot get to Settings?

You cannot change your passcode from the lock screen. You must unlock your phone first using your current passcode, Face ID, or Touch ID. Once you are in, then you can go to Settings and make the change.