Change your passcode through Settings
Open Settings on your iPhone, then tap Face ID & Passcode (or Touch ID & Passcode on older models). You will be asked to enter your current passcode. After you do, tap Change Passcode at the top of the screen.
Enter your current passcode one more time to confirm it, then enter your new passcode twice — once to set it, once to verify. Your new passcode takes effect immediately. If you forget your new passcode before you finish entering it twice, you can tap Cancel and start over.
The whole process takes less than a minute. Your iPhone will not ask you to restart or sign in again — the change is complete as soon as you finish.
Key Takeaways
- You change your passcode in Settings under Face ID & Passcode (or Touch ID & Passcode on older iPhones).
- You must enter your current passcode before you can set a new one, so you need to remember the old one.
- Your new passcode can be four digits, six digits, or a mix of numbers and letters — you choose the length when you set it.
- If you forget your current passcode and cannot enter it, you will need to erase your iPhone and set it up again.
Choosing between four digits, six digits, or a custom passcode
When you tap Change Passcode, your iPhone shows you three options. Six-Digit Numeric Code is the default and the most common choice — it is harder to guess than four digits but still fast to type. Four-Digit Numeric Code is faster to enter but less secure. Custom Alphanumeric Code lets you use letters and numbers together, which is the hardest to guess but takes longer to type each time you unlock your phone.
If you choose Custom Alphanumeric Code, your iPhone will show you a keyboard instead of just numbers. You can use uppercase letters, lowercase letters, numbers, and symbols. There is no length requirement — you can make it as short or as long as you want.
Most people stick with six digits because it balances security and speed. Four digits is only worth choosing if you unlock your phone dozens of times a day and do not store sensitive information on it. Custom codes are worth the extra typing only if you handle banking, health records, or other high-value data on your phone.
What to do if you forget your current passcode
If you cannot remember your current passcode, you cannot change it through Settings — you will get stuck at the first step. Your only option is to erase your iPhone and set it up again. This deletes everything on the phone unless you have a backup.
To erase your iPhone, go to Settings > General > Transfer or Reset > Erase All Content and Settings. You will be asked to enter your passcode, your Apple ID password, or both. If you cannot enter either one, you will need to use a computer with Finder (on Mac) or iTunes (on Windows) to restore your iPhone from a backup or set it up as new.
This is why keeping your passcode written down somewhere safe — not on your phone — is worth doing. A notebook in a drawer or a password manager on your computer works.
Passcode versus Face ID or Touch ID
Your passcode is separate from Face ID or Touch ID. Changing your passcode does not affect your face or fingerprint — those stay the same. You still unlock your phone with your face or fingerprint, and your passcode is the backup you use if Face ID or Touch ID fails or if you have not used your phone in a while.
If you want to turn off Face ID or Touch ID entirely and use only your passcode, you can do that in the same Face ID & Passcode settings. Toggle off iPhone Unlock under Face ID (or iPhone Unlock under Touch ID). Your passcode will then be the only way to unlock your phone.
When your passcode resets or stops working
If you change your passcode and your iPhone suddenly will not accept it, restart your phone. Hold down the power button and either volume button until Slide to Power Off appears, then slide to turn it off. Wait a few seconds, then hold the power button again until you see the Apple logo. Try your new passcode once the phone restarts.
If your iPhone still will not accept your new passcode after a restart, and you are certain you are typing it correctly, your phone may have a software problem. Plug it into a computer and use Finder (Mac) or iTunes (Windows) to update or restore your iPhone. This usually fixes the issue without erasing your data, though a full restore will if the update does not work.
Keeping your passcode secure
Do not use a passcode that is easy to guess — avoid birthdays, anniversaries, repeating numbers like 1111, or sequences like 1234. Do not share your passcode with anyone, even family members, because anyone who knows it can unlock your phone and access your data.
If you think someone knows your passcode, change it right away. The same goes if you have used the same passcode on multiple devices or accounts — change it on all of them. A passcode that is only on your iPhone and known only to you is the strongest protection you have if you lose your phone or it is stolen.
Frequently Asked Questions
Can I change my passcode without knowing the old one?
No. You must enter your current passcode before you can set a new one. If you forget it, you will need to erase your iPhone and set it up again, which deletes everything unless you have a backup.
Will changing my passcode affect my Apple ID password?
No. Your passcode unlocks your phone. Your Apple ID password is separate and controls your iCloud account, App Store purchases, and other Apple services. Changing one does not change the other.
How often should I change my passcode?
There is no set rule. Change it if you think someone knows it, if you have used the same passcode for years, or if you have shared it with someone who no longer needs access. Otherwise, a strong passcode that only you know is secure for as long as you keep it private.
What happens if I enter the wrong passcode too many times?
After six wrong attempts, your iPhone will lock you out for one minute. After more wrong attempts, the lockout gets longer — eventually reaching 60 minutes or more. If you enter the wrong passcode many times in a row, your iPhone will ask you to try again later or erase itself, depending on your settings.