Open Settings and find the passcode menu
To change your iPhone passcode, start by opening the Settings app on your home screen. 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.
If you have forgotten your current passcode, you cannot change it through Settings. Instead, you will need to erase your iPhone and set it up again using your Apple ID and password, or restore it from a backup. This is a security feature that prevents someone else from accessing your phone if they have it in their hands.
Key Takeaways
- You must enter your current passcode before you can create a new one through Settings.
- A standard iPhone passcode is six digits, but you can choose four digits, a custom numeric code, or a custom alphanumeric code instead.
- If you forget your passcode, you will need to erase your iPhone and restore it using your Apple ID or a computer backup.
- Your new passcode takes effect immediately and you will need it the next time you unlock your phone.
Tap Change Passcode and enter your new code
Once you are in the Face ID & Passcode (or Touch ID & Passcode) menu, look for the option labeled Change Passcode. Tap it. You will see a screen asking you to enter your current passcode one more time to confirm your identity.
After you enter your current passcode, the screen will prompt you to enter your new passcode. Type the code you want to use. By default, iPhone expects a six-digit number, but you can choose a different format if you prefer.
Choose your passcode format
Before you confirm your new passcode, you have the option to change the format. Tap Passcode Options to see your choices. You can select Custom Numeric Code (any length of numbers), 4-Digit Numeric Code (exactly four digits), or Custom Alphanumeric Code (letters and numbers mixed together).
A longer passcode is more secure, but harder to remember and slower to enter every time you unlock your phone. A four-digit code is faster but easier to guess. Most people stick with the default six-digit option as a balance between security and convenience.
Confirm your new passcode by entering it twice
After you choose your format and enter your new passcode, iPhone will ask you to enter it again to make sure you typed it correctly. Type the same code a second time. If the two entries match, your new passcode is saved immediately.
Your phone will return to the Settings menu. The next time you lock your iPhone or restart it, you will need to use your new passcode to unlock it. Your old passcode will no longer work.
What happens if you forget your new passcode
If you forget your new passcode after you set it, you cannot retrieve it. You will have to erase your iPhone completely and set it up again. You can do this using your Apple ID and password, or by restoring from a backup you made before you changed the passcode.
To erase your iPhone, go to Settings, tap General, then Reset, then Erase All Content and Settings. You will be asked to enter your Apple ID password. After the phone erases, you can set it up as new or restore from a backup.
Use a passcode you can remember but others cannot guess
When you choose a new passcode, avoid obvious numbers like your birthday, your address, or a sequence like 1-2-3-4-5-6. These are easy to guess if someone knows you. A random mix of numbers is more secure, but write it down somewhere safe if you think you might forget it — not on a sticky note on your desk.
If you use Face ID or Touch ID on your iPhone, you will not have to enter your passcode every time you unlock your phone. However, you still need a passcode as a backup if your face or fingerprint is not recognized, or if you restart your phone.
Frequently Asked Questions
Can I change my passcode without entering the old one?
No. iPhone requires you to enter your current passcode before you can change it. This is a security measure to prevent someone else from changing your passcode if they have temporary access to your phone. If you have forgotten your current passcode, you must erase your iPhone and set it up again using your Apple ID.
What is the difference between a passcode and a password?
On an iPhone, a passcode is the code you use to unlock your phone itself. A password is what you use to log into your Apple ID account, email, or other apps. You need both to keep your phone and your data secure.
Does changing my passcode affect my Apple ID password?
No. Your iPhone passcode and your Apple ID password are separate. Changing one does not change the other. You can change your Apple ID password through Settings by tapping your name at the top, then Password & Security, then Change Password.
Will I lose my data if I change my passcode?
No. Changing your passcode through Settings does not erase any of your photos, messages, apps, or other data. Your information stays on your phone. Only if you forget your passcode and have to erase your iPhone will you lose data — unless you restore from a backup.