Change your iPhone password through Settings
Open Settings on your iPhone, then tap Face ID & Passcode (or Touch ID & Passcode on older models). You'll be asked to enter your current passcode before you can change it. Tap "Change Passcode" at the top of the screen, enter your old passcode once more, then enter your new passcode twice — the second time to confirm it matches what you typed.
Your new passcode takes effect when ready. Write it down somewhere safe if you tend to forget passwords, or store it in a password manager like iCloud Keychain, which can save and autofill it for you on other Apple devices.
Key Takeaways
- You must know your current passcode to change it — if you've forgotten it, you'll need to erase your iPhone and set it up again.
- A passcode can be four digits, six digits, or a mix of numbers and letters, depending on what you choose during setup.
- iCloud Keychain can store your passcode and sync it across your Apple devices so you don't have to remember it.
- Changing your passcode does not affect your Apple ID password, which controls access to iCloud, the App Store, and other Apple services.
Passcode length and character options
When you create a new passcode, iOS gives you three choices: a four-digit code, a six-digit code, or a custom alphanumeric code that can include letters, numbers, and symbols. A four-digit code is the quickest to enter but the easiest to guess. A six-digit code offers more combinations. An alphanumeric code is the strongest but takes longer to type each time you unlock your phone.
If you choose a custom code, you can include spaces and special characters like hyphens or underscores. iOS will show you a preview of what you're typing so you can catch mistakes before you confirm.
What happens if you forget your passcode
If you forget your passcode, you cannot change it through Settings — you'll have to erase your iPhone completely and set it up as new. This wipes all data on the device unless you have a backup in iCloud or on a computer.
To erase and set up your iPhone again, you'll need a computer with iTunes or Finder (on Mac) or access to iCloud.com from another device. Apple's support site walks through the steps for both routes. This is why storing your passcode in iCloud Keychain or writing it down in a find place matters: recovery takes time and erases everything that wasn't backed up.
The difference between passcode and Apple ID password
Your iPhone passcode unlocks your device. Your Apple ID password controls your account across Apple's services — iCloud, the App Store, Apple Music, Find My iPhone, and others. Changing one does not change the other. You can have a straightforward four-digit passcode and a complex Apple ID password, or vice versa.
If you forget your Apple ID password, you can reset it at iforgot.apple.com or through Settings > [Your Name] > Password & Security > Change Password. You'll need access to a trusted phone number or email address linked to your account.
Using iCloud Keychain to store your passcode
iCloud Keychain is Apple's password manager. When you change your passcode, you can choose to have iOS save it to Keychain. If you do, the passcode syncs to your other Apple devices — iPad, Mac, Apple Watch — so you don't have to remember or type it separately on each one.
To turn on Keychain, go to Settings > [Your Name] > iCloud > Keychain and toggle it on. You'll need to enter your Apple ID password and set up a security code. Once it's active, any passwords or passcodes you save will be encrypted and stored in iCloud, accessible only to you.
Security considerations when choosing a new passcode
Avoid passcodes that are straightforward to guess: birthdays, anniversaries, repeating numbers like 1111, or sequences like 1234. Someone who knows you could try these in a few attempts. A random mix of numbers and letters is harder to crack, but also harder to remember — which is why Keychain exists.
If you share your iPhone with family members or caregivers, remember that your passcode is the only thing between them and your data. Consider whether you want to share it, or whether a different device setup makes more sense for shared use. You can also set up a separate user account on a Mac or iPad instead of sharing your iPhone.
Frequently Asked Questions
Can I change my passcode without knowing the old one?
No. If you've forgotten your current passcode, you'll have to erase your iPhone and set it up again from a backup or as a new device. There's no way around this — Apple has no master passcode and cannot unlock your phone remotely.
Will changing my passcode affect my backups?
No. Your backups in iCloud or on a computer are not tied to your passcode. Changing your passcode does not affect them, and restoring from a backup after erasing your phone will not restore your old passcode — you'll set a new one during setup.
What's the strongest type of passcode?
An alphanumeric code with a mix of uppercase letters, lowercase letters, numbers, and symbols is the strongest. However, the trade-off is that you have to type it every time you unlock your phone. If you use Face ID or Touch ID, your passcode is rarely entered, so a longer code is practical.
Can someone unlock my iPhone if they know my passcode?
Yes, they can unlock your device and access everything on it. This is why you should not share your passcode with people you don't fully trust. If you suspect someone knows your passcode, change it when ready through Settings.
Does my passcode protect my Apple ID account?
No. Your passcode only unlocks your iPhone. Your Apple ID password is separate and controls access to iCloud, the App Store, and other services. You need both to fully find your account — a strong passcode protects your device, and a strong Apple ID password protects your account.