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 four- or six-digit code that unlocks your phone. It's separate from your Apple ID password. Changing it regularly is one of the simplest ways to keep your phone secure, especially if you think someone has seen you enter it or if you've used the same code for a long time.
Key Takeaways
- Open Settings, go to Face ID & Passcode (or Touch ID & Passcode), and tap Change Passcode to start the process.
- You must enter your current passcode before you can create a new one.
- New passcodes must be at least four digits, but six digits is more secure and is the default on newer iPhones.
- If you forget your new passcode immediately after changing it, you can change it again right away without waiting.
- If you forget your passcode and can't remember it, you'll need to erase your phone and set it up again using your Apple ID.
Step-by-step: changing your passcode
Start by opening the Settings app on your home screen. Tap the gear icon if you don't see it in your dock.
Scroll down and tap Face ID & Passcode if your phone has face recognition, or Touch ID & Passcode if it has a fingerprint sensor. On very old iPhones, you may see just Passcode. Tap whichever option appears.
When prompted, enter your current passcode. This is the code you use right now to unlock your phone. If you've forgotten it, you cannot change it from this screen — you'll need to erase your phone instead (see the section below on forgotten passcodes).
Once you've entered your current code correctly, tap Change Passcode. You'll see a screen asking you to enter your current passcode one more time. Type it in again.
Now enter your new passcode. If your phone offers a choice between four and six digits, choose six — it's much harder to guess. Type the code twice to confirm you didn't make a typo. Tap Done or Save, depending on your iOS version.
Your new passcode is now active. The next time you lock your phone, you'll use the new code to unlock it.
What to do if you forget your new passcode right away
If you just changed your passcode and immediately forgot what you entered, don't panic. You can change it again without any waiting period. Open Settings, go back to Face ID & Passcode (or Touch ID & Passcode), enter the new code you just created, and tap Change Passcode again. This time, enter the code you just set, then create a different one you'll actually remember.
Write down your new passcode somewhere safe if you tend to forget numbers — a notebook at home, not in your phone. You can also use a password manager like iCloud Keychain to store it, though you'll still need to remember the passcode itself to unlock your phone.
If you've forgotten your passcode and can't remember it
If you can't enter your current passcode in Settings, you cannot change it from the Settings screen. Instead, you'll need to erase your iPhone and set it up again. This is a bigger step, but it's the only way forward if you've truly forgotten the code.
Go to Settings, tap General, scroll to the bottom, and tap Transfer or Reset. Tap Erase All Content and Settings. Your phone will ask you to confirm and may ask for your Apple ID password. Once you confirm, your phone will erase completely and restart as if it were brand new.
When your phone restarts, you'll see the setup screen. Follow the prompts to set up your phone again using your Apple ID. During setup, you'll be asked to create a new passcode. This is your chance to set one you'll remember.
This process erases everything on your phone — all photos, messages, apps, and files — unless you have a backup. If you back up to iCloud or a computer regularly, you can restore your data after setup is complete. If you don't have a backup, the data is gone.
Passcode length: four digits versus six
iPhones allow passcodes of four, six, or more digits. Newer iPhones default to six digits because they're much harder to guess than four. A four-digit code has only 10,000 possible combinations. A six-digit code has one million.
When you change your passcode in Settings, your phone may ask whether you want to use a four-digit or six-digit code. Choose six digits unless you have a specific reason not to. The extra two digits take only a second or two longer to type each time you unlock your phone, but they make your phone far more secure.
If you want to change from four digits to six (or vice versa), you do that in the same Settings screen where you change the code itself. When you tap Change Passcode and enter your current code, you'll see an option to choose the length before you create the new one.
Why change your passcode regularly
Changing your passcode every few months is a good security habit, especially if you think someone may have watched you enter it or if you've used the same code for more than a year. A passcode that stays the same for years is more likely to be guessed or remembered by someone who saw you use it.
You should also change your passcode immediately if you suspect someone has used your phone without permission, if you've lent your phone to someone and later regretted it, or if you've entered your code in front of someone you no longer trust. Changing it takes two minutes and removes any doubt about who can unlock your phone.
Frequently Asked Questions
Is my passcode the same as my Apple ID password?
No. Your passcode unlocks your phone itself. Your Apple ID password unlocks your Apple account and lets you download apps, use iCloud, and make purchases. They are completely separate. You can change one without changing the other.
What happens if I enter the wrong passcode too many times?
After six wrong attempts, your phone will lock you out for one minute. After ten wrong attempts, it locks for five minutes. After fifteen wrong attempts, it locks for 15 minutes or longer. This is intentional — it makes it much harder for someone to guess your code by trying many combinations quickly.
Can I use letters or symbols in my passcode instead of just numbers?
No. iPhone passcodes must be numbers only. If you want to use letters and symbols, you can set up a longer alphanumeric password instead, but this is less common and takes longer to type each time you unlock your phone.
Do I need to change my passcode if I change my Apple ID password?
No. Your passcode and Apple ID password are separate. Changing one does not affect the other. You can change them independently whenever you want.
Will changing my passcode affect my Face ID or Touch ID?
No. Face ID and Touch ID are separate from your passcode. Changing your passcode does not change your biometric settings. You can still unlock your phone with your face or fingerprint, and you'll use your new passcode only if Face ID or Touch ID fails or if you restart your phone.