Open Settings and find the passcode menu
On your iPhone, open the Settings app. Scroll down and tap Face ID & Passcode (on newer iPhones with face recognition) or Touch ID & Passcode (on older models with a home button). You will be asked to enter your current passcode before you can proceed to the menu where changes are made.
The location of this menu is the same across all iPhone models, though the name changes depending on which biometric system your phone uses. If your iPhone is very old and has neither Face ID nor Touch ID, look for a section simply labeled Passcode in Settings.
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. Apple does not have a way to recover a forgotten passcode without erasing the device, so if you are locked out, erasing is your only option.
Key Takeaways
- Open Settings, then tap Face ID & Passcode (or Touch ID & Passcode on older iPhones) and enter your current passcode to reach the change menu.
- You must enter your current passcode twice during the process — once to access the menu and once more to confirm your identity before changing it.
- You can choose between a six-digit code, a four-digit code, or a custom alphanumeric code by tapping Passcode Options before you enter your new code.
- Your new passcode takes effect immediately after you confirm it, and you should test it by locking and unlocking your phone to verify it works.
- If you forget your current passcode, you cannot change it — you will need to erase your iPhone using a computer or iCloud and set it up from scratch.
Tap Change Passcode and confirm your identity
Once you are in the Face ID & Passcode or Touch ID & Passcode menu, look for the option labeled Change Passcode. Tap it. Your phone will ask you to enter your current passcode one more time to confirm your identity before allowing any changes.
This second entry is a security step — it ensures that someone who briefly has your phone cannot change your passcode without knowing the old one. Even if your phone is unlocked, the system requires you to prove you know the passcode itself, not just that you can unlock the device with your face or fingerprint.
If you enter the wrong passcode at this point, your phone will tell you and ask you to try again. After several incorrect attempts, your phone may introduce a delay before allowing the next try as a security measure.
Choose your passcode type and enter your new code
After you enter your current passcode correctly, the screen will prompt you to enter a new passcode. By default, iPhone passcodes are six digits long. If you want a different type of code, tap Passcode Options before entering anything new.
Your options are: a six-digit numeric code (the default), a four-digit numeric code (faster to enter but less secure), or a custom alphanumeric code (letters and numbers mixed, the most secure option). Choose the type that fits your needs, then type your new code into the field provided.
After you enter your new passcode once, your iPhone will ask you to enter it again to confirm you typed it correctly. Both entries must match exactly. If they do not match, your phone will tell you and ask you to start over.
Confirm the change and test your new passcode
After you enter your new passcode twice and both entries match, your iPhone will confirm that the change is complete. You will be returned to the Face ID & Passcode menu. Your new passcode is now active immediately — there is no waiting period or additional step required.
Test your new passcode right away by locking your phone and unlocking it with your new code. Press the side button and volume button together (or use the lock screen on older models), then unlock your phone using your new passcode. This takes only a few seconds and confirms the change worked correctly.
If your new passcode does not work when you test it, go back into Settings and try changing it again. This is rare, but testing immediately prevents you from discovering a problem later when you are locked out.
What to do if you forget your new passcode
If you forget your passcode after changing it, you cannot retrieve it or have Apple send it to you. You will need to erase your iPhone completely and set it up again from scratch. This is by design — Apple prioritizes security over convenience, so there is no backdoor to recover a lost passcode.
To erase your iPhone, you can use a computer with iTunes or Finder (if you have a backup), or use iCloud's Find My iPhone feature from another device or a web browser. After erasing, you can set up your phone again and create a new passcode.
To avoid this situation, write down your new passcode in a secure place, such as a locked drawer or a password manager app. Many people use apps like 1Password or Bitwarden to store important codes. This prevents you from being locked out of your own device.
Passcode options and security considerations
A six-digit passcode is the default and offers reasonable security for most people. A four-digit code is faster to enter but significantly less secure — there are only 10,000 possible four-digit combinations compared to one million possible six-digit combinations. An alphanumeric code (letters and numbers) is the most secure option if you want maximum protection, though it takes longer to enter each time.
If your old passcode was compromised or you suspect someone knows it, choose a new one that is completely different and harder to guess. Avoid using birthdates, anniversaries, or sequences like 1-2-3-4-5-6. The stronger your passcode, the harder it is for someone to break into your phone if they gain physical access to it.
Changing your passcode does not affect Face ID or Touch ID. Your biometric unlock methods will continue to work alongside your new passcode. If biometric unlock fails for any reason, you will still be able to unlock your phone with your passcode as a backup.
Frequently Asked Questions
Can I use the same passcode I used before?
Yes, there is no rule preventing you from entering the same code. However, if your old passcode was compromised or you want better security, choose a new one that is different and harder to guess. Changing to the same code defeats the purpose of changing it.
Will changing my passcode affect Face ID or Touch ID?
No. Face ID and Touch ID remain active and unchanged. Your biometric unlock methods will continue to work alongside your new passcode. If biometric unlock fails, you will still be able to unlock your phone with your passcode.
Can I change my passcode from my computer or another device?
No. You must change your passcode directly on your iPhone using the Settings app. There is no way to change it remotely, from a computer, or from another device. You must have physical access to your iPhone and know your current passcode.
What if I enter the wrong passcode too many times?
If you enter an incorrect passcode several times in a row, your iPhone will introduce a delay before allowing the next attempt. This is a security feature to prevent someone from guessing your code repeatedly. Wait the required time and try again with the correct passcode.