Change your passcode through Settings on any iPhone
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 old passcode once more, then create a new one. The new passcode takes effect immediately.
If you've forgotten your current passcode, you cannot change it through Settings — you'll need to erase the iPhone and set it up again, which requires your Apple ID password or recovery key. This is intentional: Apple locks you out to prevent someone else from changing your security.
The process is the same whether you use a 4-digit, 6-digit, or custom alphanumeric passcode. If you want to switch from one type to another (for example, from 6 digits to a longer password), you'll do that during the change process.
Key Takeaways
- You change your passcode in Settings under Face ID & Passcode or Touch ID & Passcode, and you must know your current passcode to make the change.
- A new passcode becomes active as soon as you finish entering it — there's no confirmation step or waiting period.
- If you forget your passcode, you cannot retrieve it; you'll need to erase the phone and restore it using your Apple ID.
- You can switch between a 6-digit code, 4-digit code, or custom alphanumeric passcode during the change process.
Step-by-step: changing your passcode in Settings
Start by opening the Settings app on your home screen. Scroll down and tap Face ID & Passcode (on iPhone X and newer, or any iPhone with Face ID), or Touch ID & Passcode (on iPhone 8 and earlier, or any iPhone with Touch ID but no Face ID). You'll see a prompt asking for your current passcode — enter it.
Once you're in, tap Change Passcode at the top of the screen. You'll be asked to enter your current passcode one more time. After you do, you'll see the option to create a new passcode. By default, iOS suggests a 6-digit code, but you can choose a different format if you want.
Enter your new passcode twice to confirm it matches. The second entry prevents typos from locking you out. Once you tap Done, your new passcode is active immediately. Your old passcode no longer works.
Choosing between passcode types
When you tap Change Passcode, iOS defaults to a 6-digit numeric code. If you want something different, tap Passcode Options before entering your new code. You'll see three choices: a 6-digit numeric code, a 4-digit numeric code, or a custom alphanumeric code (letters, numbers, and symbols).
A 4-digit code is faster to enter but weaker — there are only 10,000 possible combinations. A 6-digit code is the standard and offers 1 million combinations. A custom alphanumeric code is strongest but takes longer to type, especially on the lock screen where you can't see what you're typing.
Most people stick with 6 digits. If you use a 4-digit code, you're trading security for speed. If you use an alphanumeric code, make sure it's something you can type accurately without looking, because you'll need to enter it to unlock your phone.
What happens if you forget your passcode
If you enter the wrong passcode too many times, your iPhone will lock you out temporarily. After the first few wrong attempts, you'll see a countdown timer. After many wrong attempts in a row, you'll be locked out for hours or the phone will erase itself entirely (depending on your settings).
If you've forgotten your passcode and can't guess it, you cannot change it through Settings. Instead, you'll need to erase the iPhone completely and set it up again. You can do this using a computer with Finder (on Mac) or iTunes (on Windows), or by using iCloud's Find My iPhone feature.
To erase using iCloud, go to iCloud.com on another device, open Find My, select your iPhone, and choose Erase iPhone. You'll then set it up as new or restore from a backup. Either way, you'll need your Apple ID password to complete the setup. If you don't remember that either, you'll need to recover your Apple ID through Apple's account recovery process.
Passcodes versus Face ID and Touch ID
Your passcode is a backup to Face ID or Touch ID, not a replacement. Even if you have Face ID or Touch ID turned on, you still need a passcode. If Face ID or Touch ID fails or isn't available, you'll unlock your phone with your passcode instead.
Changing your passcode does not affect Face ID or Touch ID — those stay active and work the same way. If you want to turn off Face ID or Touch ID entirely, you can do that in the same Settings screen, but you'll still need a passcode to unlock your phone.
Some apps and services (like Apple Pay or accessing your passwords) may require Face ID, Touch ID, or your passcode as an extra security step, even if you've already unlocked your phone. Changing your passcode doesn't change how those work.
Passcode requirements and restrictions
iOS doesn't prevent you from using a simple passcode like 000000 or 123456, but it will warn you that the code is weak. You can ignore the warning and use it anyway, but a weak passcode is easier for someone to guess if they have physical access to your phone.
Your passcode cannot be the same as a previous passcode you've used on that iPhone — iOS will reject it and ask you to choose something different. This prevents you from cycling through the same few codes repeatedly.
There's no character limit for a custom alphanumeric passcode, but longer codes take longer to enter. Most people choose something between 8 and 16 characters. Whatever you choose, write it down and store it somewhere safe in case you forget it, because there's no way to recover it.
Changing your passcode on a shared or family device
If your iPhone is part of a Family Sharing group, changing your passcode only affects your own access — it doesn't change the passcode for other family members. Each person who uses the phone needs their own passcode or biometric (Face ID or Touch ID).
If you're the account holder and you change your passcode, children or other family members with restricted accounts can still use their own Face ID or Touch ID to unlock the phone. Their access doesn't change unless you modify their parental controls separately.
If you share a device and want to prevent others from changing the passcode, you'll need to set up Screen Time restrictions. This requires a separate Screen Time passcode, which is different from your device passcode. Screen Time lets you lock down settings changes, including passcode changes.
Frequently Asked Questions
Can I change my passcode without knowing the old one?
No. If you don't know your current passcode, you cannot change it through Settings. You'll need to erase the iPhone and set it up again using your Apple ID password or a recovery key. There's no way around this — it's a security feature to prevent unauthorized access.
Does changing my passcode affect my Apple ID password?
No. Your device passcode and your Apple ID password are separate. Changing one does not change the other. If you want to change your Apple ID password, you'll do that on Apple's account website or in Settings under your name at the top of the screen.
How often should I change my passcode?
There's no rule that says you must change it regularly. Change it if you think someone knows it, if you've used the same code on multiple devices, or if you want to be extra cautious. For most people, a strong passcode that you don't share is enough.
What if I change my passcode and then forget the new one?
You'll need to erase your iPhone and set it up again. There's no recovery option for a forgotten passcode. Before you change it, make sure you write down the new code and test it by locking and unlocking your phone a few times to confirm you can enter it correctly.
Can I use the same passcode on multiple devices?
Yes, but it's not recommended. If someone learns your passcode, they can unlock all your devices. Using different passcodes on each device is more secure, though harder to remember. If you use the same code everywhere, make sure it's strong and that you don't share it.