Change your iPhone passcode through Settings
To change your iPhone passcode, open Settings, tap Face ID & Passcode (or Touch ID & Passcode on older models), enter your current passcode, then tap Change Passcode. You'll enter your current code again, then create a new one. The whole process takes about two minutes.
Your passcode is the numeric or alphanumeric code that unlocks your phone — different from your Apple ID password. Changing it regularly is a practical way to keep your device secure, especially if you think someone may have seen you enter it or if you've used the same code for a long time.
Key Takeaways
- You change your passcode in Settings under Face ID & Passcode or Touch ID & Passcode, not in any other menu.
- You must enter your current passcode correctly before you can set a new one — if you forget it, you'll need to erase and restore your phone.
- iPhone allows you to use a 4-digit, 6-digit, or custom alphanumeric passcode depending on your security needs.
- If you forget your new passcode immediately after changing it, you can go back into Settings and change it again before you lock your phone.
Step-by-step: changing your passcode
Open the Settings app on your home screen. Scroll down and tap Face ID & Passcode if you have a newer iPhone with face recognition, or Touch ID & Passcode on models with a fingerprint sensor. Older iPhones may show Passcode instead.
When the menu opens, it will ask you to enter your current passcode. Type it in exactly as you normally would to unlock your phone. This step confirms you're the person who set the original code and prevents someone else from changing it if they have temporary access to your unlocked phone.
After you enter the current passcode correctly, tap Change Passcode at the top of the screen. The phone will ask you to enter your current passcode one more time — this is a safety check. Type it in again.
Now you'll see a field asking for your new passcode. Enter the code you want to use going forward. If you're using the default 6-digit numeric code, just type six numbers. If you want to use a 4-digit code or a mix of letters and numbers, you can change the passcode type before you create the new one (see the section below on passcode types).
Re-enter your new passcode when prompted to confirm it. Your phone will show a message confirming the change was successful. You're done — your old passcode no longer works, and your new one is active immediately.
Choosing between 4-digit, 6-digit, and custom passcodes
By default, iPhone uses a 6-digit numeric passcode. When you tap Change Passcode, you can choose a different type before you create the new code. Tap Passcode Options to see your choices.
A 4-digit numeric passcode is faster to enter but less secure — there are only 10,000 possible combinations. A 6-digit numeric passcode is the standard and offers a reasonable balance of security and speed, with 1 million possible combinations. A custom alphanumeric passcode can include letters, numbers, and symbols, making it much harder to guess, but it takes longer to type each time you unlock your phone.
If you choose Custom Alphanumeric Code, you can make your passcode as long and complex as you want. For example, you could use something like "Blue$Sunset42" instead of just numbers. This is the most secure option if you're concerned about someone guessing your code, but remember you'll type it more slowly each time you unlock your phone.
What to do if you forget your current passcode
If you can't remember your current passcode, you cannot change it through Settings — the phone requires you to enter the old code first. Your only option is to erase your iPhone and set it up again from a backup or as a new device.
To erase your phone, go to Settings, tap General, scroll to the bottom, and tap Transfer or Reset. Choose Erase All Content and Settings. You'll need to enter your Apple ID password to confirm. After the phone erases, you can restore it from an iCloud backup (if you have one) or set it up as new. When you set it up, you'll create a brand new passcode.
This is why it's important to remember your current passcode before you try to change it. If you're worried you might forget a new passcode, test it by locking your phone immediately after changing it and unlocking it with the new code while you're still in Settings.
Why your passcode matters more than your Apple ID password
Your passcode unlocks your physical phone — it's the first line of defense if someone picks up your device. Your Apple ID password is different; it controls your account, your backups, and your purchases. Both matter, but your passcode is what stops someone from using your phone right now.
If you use Face ID or Touch ID, your passcode is still the backup. If your face or fingerprint doesn't work, you'll enter your passcode instead. If someone disables Face ID or Touch ID on your phone, they'll need your passcode to get in. Changing your passcode regularly means that even if someone saw you enter it weeks ago, it won't work anymore.
Common mistakes when changing your passcode
The most common mistake is forgetting your new passcode before you lock your phone. If you change your code and immediately close Settings without testing it, you might lock yourself out. After you change your passcode, lock your phone right away and unlock it with the new code to make sure you remember it. If you get it wrong, you can go back into Settings and change it again before the phone locks you out.
Another mistake is confusing your passcode with your Apple ID password. When Settings asks you to enter your current passcode during the change process, it wants the numeric or alphanumeric code you use to unlock your phone — not your Apple ID password. If you enter your Apple ID password by mistake, it won't work and you'll see an error message.
Some people also change their passcode and then forget they did it, especially if they use the same code on multiple devices. Write down your new passcode somewhere safe (not on a sticky note on your phone) until you're sure you'll remember it. A password manager on your computer is a better place to store it than paper.
Frequently Asked Questions
Can I change my passcode if my phone is locked and I forgot the code?
No. If you can't unlock your phone, you can't get into Settings to change the passcode. You'll need to erase the phone through iCloud.com (Find My iPhone) or by connecting it to a computer with Finder or iTunes, then set it up again. This is why remembering your current passcode is essential before you try to change it.
Will changing my passcode affect my Face ID or Touch ID?
No. Face ID and Touch ID will continue to work exactly as before. Your passcode is just the backup method if facial recognition or fingerprint scanning fails. Changing your passcode doesn't touch your biometric settings at all.
How often should I change my iPhone passcode?
There's no rule that says you must change it on a schedule. Change it if you think someone saw you enter it, if you've used the same code for several years, or if you suspect your phone's security has been compromised. For most people, changing it once or twice a year is reasonable.
What happens if I enter the wrong passcode too many times?
After several incorrect attempts, your phone will lock you out temporarily — first for one minute, then longer with each failed try. After too many failures, you'll see a message saying your iPhone is disabled and you'll need to connect to a computer or use iCloud to reset it. This is a security feature to prevent someone from guessing your code.
Can I use the same passcode on my iPad and Apple Watch?
Your iPad and Apple Watch have their own separate passcodes. You can use the same numbers on all your devices if you want, but changing one doesn't change the others. Each device's passcode is managed independently in its own Settings menu.