The fastest way: Settings > Face ID & Passcode

Open Settings on your iPhone, then tap Face ID & Passcode (or Touch ID & Passcode on older models). You'll be asked to enter your current passcode first — this is a security step to make sure only you can change it. Once you're in, tap Change Passcode at the top of the screen.

You'll enter your current passcode again, then type your new one twice. iOS will tell you if your new passcode is too straightforward — for instance, if it's all the same number or a repeating pattern. You can ignore this warning and use it anyway, but a stronger passcode protects your phone better if someone tries to guess it.

The change takes effect when ready. Your old passcode stops working right away.

Key Takeaways

  • Go to Settings, then Face ID & Passcode (or Touch ID & Passcode), and tap Change Passcode to start the process.
  • You must enter your current passcode twice during the change — once to prove you own the phone, and once more as confirmation.
  • iOS will warn you if your new passcode is weak, but you can use it anyway; stronger passcodes are harder to guess.
  • If you forget your new passcode after changing it, you'll need to erase your iPhone and set it up again from a backup or as new.

What happens if you forget your new passcode

If you change your passcode and then forget it, iOS will lock you out after six failed attempts. You cannot recover a forgotten passcode — there is no "reset" option that lets you keep your data. Your only path forward is to erase the iPhone completely and set it up again.

You can restore from a backup you made before the passcode change, which will put your photos, messages, and apps back on the phone. If you don't have a backup, you'll be setting up a blank iPhone. This is why writing down your new passcode somewhere safe — or using one you already know well — matters before you hit Change Passcode.

Passcode length and what iOS allows

By default, iOS requires a six-digit passcode. When you tap Change Passcode, you can also tap Passcode Options to switch to a four-digit code, a custom numeric code of any length, or a custom alphanumeric code (letters and numbers mixed). A longer passcode or one with letters is harder to crack, but it's also slower to type every time you unlock your phone.

If you choose a four-digit code, keep in mind that someone watching you unlock your phone has a one-in-ten-thousand chance of guessing it by brute force — much better odds than with a six-digit code. Alphanumeric codes are the strongest option iOS offers, but they take longer to enter.

Why your lock screen password matters for your data

Your lock screen passcode is the first line of defense between someone holding your phone and your messages, photos, banking apps, and email. If someone gets past it, they can read your private conversations, change your Apple ID password, or lock you out of your own accounts.

The passcode also encrypts the data on your phone — meaning even if someone removes the storage chip and tries to read it on another computer, they cannot access it without the passcode. This is why iOS will not let you recover a forgotten passcode; doing so would break that encryption and defeat the whole point.

Changing your passcode on older iPhones

If you have an iPhone 5s or earlier, or an iPhone running iOS 8 or older, the path is the same: Settings > Touch ID & Passcode > Change Passcode. The screen layout is slightly different, but the steps are identical. You enter your current passcode, then your new one twice.

Older iPhones default to a four-digit passcode instead of six digits. If you want to change to a longer code, tap Passcode Options and choose Custom Numeric Code or Custom Alphanumeric Code, just as you would on a newer phone.

Passcode versus Face ID or Touch ID

Your passcode is separate from Face ID or Touch ID. Changing your passcode does not change your fingerprint or face data — those stay the same. If you want to change which fingerprint unlocks your phone, or re-scan your face, that's a different setting: Settings > Face ID & Passcode > Add a Fingerprint or Re-Enroll Face ID.

Your passcode is the backup unlock method. If Face ID or Touch ID fails or is turned off, you'll need your passcode to get into your phone. This is why you should never use a passcode you might forget — it's your last way in.

Frequently Asked Questions

Do I need to know my old passcode to change it?

Yes. iOS asks you to enter your current passcode before letting you set a new one. This prevents someone else from changing your passcode if they pick up your unlocked phone. If you've forgotten your current passcode, you'll need to erase your iPhone and set it up again.

Can I use the same passcode twice in a row?

iOS will let you set a new passcode that's identical to your old one, though it will ask you to confirm. There's no technical reason to do this, since your old passcode already works. If you want to keep the same code, just cancel out of the Change Passcode screen.

What if I change my passcode and then can't remember it the next day?

You'll be locked out after six wrong attempts. Your only option is to erase the iPhone using Find My iPhone (on iCloud.com) or a computer with Finder, then set it up again. If you have a backup from before the passcode change, you can restore from that backup.

Does changing my passcode affect my Apple ID password?

No. Your lock screen passcode and your Apple ID password are completely separate. Changing one does not change the other. Your Apple ID password is what you use to sign into the App Store, iCloud, and other Apple services — you change that in Settings > [Your Name] > Password & Security.

Can I set a passcode with spaces or special characters?

No. iOS only allows numbers and letters. If you choose Custom Alphanumeric Code, you can use uppercase and lowercase letters plus numbers, but not spaces, punctuation, or symbols. Numeric codes can only contain the digits 0 through 9.