Change your passcode through Settings, not through recovery mode
Open Settings on your iPhone, tap Face ID & Passcode (or Touch ID & Passcode on older models), then enter your current passcode. Tap Change Passcode at the top, enter your current passcode again, then enter your new passcode twice. That's the full process — it takes about two minutes and you stay in control the whole time.
The reason to do this through Settings is simple: you keep your phone unlocked and accessible. Recovery mode — the other way to change a passcode — erases your entire phone and requires you to set it up from scratch. Use Settings unless you've forgotten your passcode entirely and have no other choice.
Key Takeaways
- Go to Settings > Face ID & Passcode (or Touch ID & Passcode), enter your current passcode, then tap Change Passcode to set a new one without erasing anything.
- Your new passcode can be 4 digits, 6 digits, or a mix of letters and numbers — iPhone will ask which length you want when you start the change.
- If you forget your passcode and have no backups, you'll need to erase the phone through recovery mode and set it up again from scratch.
- Write down your new passcode somewhere secure, or use a password manager like iCloud Keychain to store it — losing it means losing access to your phone.
What passcode length to choose
When you tap Change Passcode, iPhone asks whether you want a 4-digit code, 6-digit code, or custom alphanumeric code. Most people choose 6 digits because it's stronger than 4 digits but faster to type than a full password with letters and symbols.
A 4-digit passcode (like 1234) is quick to enter but has only 10,000 possible combinations — someone trying random codes could get in within hours. A 6-digit passcode has 1 million combinations, which takes much longer to brute-force. A custom code with letters and numbers is strongest but slowest to type every time you unlock your phone.
Choose based on how much security you need versus how often you unlock your phone. If your iPhone holds banking apps or sensitive work documents, 6 digits is a reasonable middle ground. If it's mostly for calls and texts, 4 digits is fine.
The step-by-step process
Open the Settings app on your home screen. Scroll down and tap Face ID & Passcode if you use Face ID to unlock, or Touch ID & Passcode if you use your fingerprint. If your iPhone is very old and uses neither, look for Passcode instead.
Enter your current passcode when prompted. This confirms you own the phone and have permission to change security settings. Tap Change Passcode at the top of the screen.
Enter your current passcode one more time. Then enter your new passcode, and enter it again to confirm. iPhone will show you dots as you type — this is normal and keeps someone looking over your shoulder from seeing the actual numbers.
Once you confirm, you're done. Your new passcode is active immediately. The next time you lock your phone, you'll use the new code to unlock it.
If you've forgotten your current passcode
If you don't remember your passcode and have no way to unlock your phone, you'll need to erase it and start over. This is the only way forward — there's no "forgot passcode" recovery like there is for Apple ID passwords.
You can erase your phone through iCloud.com if you set up Find My iPhone before you forgot the passcode. Go to iCloud.com, sign in with your Apple ID, open Find My, select your iPhone, and choose Erase iPhone. This wipes the phone remotely and lets you set it up fresh with a new passcode.
If you didn't set up Find My, you'll need to use a computer and Apple's recovery mode. Connect your iPhone to a Mac or Windows PC with iTunes or Finder, force restart the phone while it's connected, then choose Restore when prompted. This also erases everything and lets you set a new passcode during setup.
Why you should use iCloud Keychain to store your passcode
iCloud Keychain is Apple's built-in password manager. When you change your passcode, you can ask iPhone to save it to Keychain, and it will sync across your other Apple devices. If you forget the passcode later, you can look it up on your Mac, iPad, or through iCloud.com.
To turn on Keychain, go to Settings > [Your Name] > iCloud > Keychain and toggle it on. You'll need to verify your identity with Face ID or your Apple ID password. After that, whenever you change a passcode, iPhone will offer to save it.
This doesn't replace writing it down somewhere safe — it's a backup. If you lose access to all your Apple devices and your Apple ID, you still won't be able to recover the passcode. But for most people, Keychain is a practical way to keep the code safe without relying on memory.
What happens if someone else knows your passcode
If you think someone has learned your passcode — a family member, a coworker, someone who watched you unlock your phone — change it immediately using the steps above. The sooner you do, the sooner they lose access.
After you change it, consider whether they might have written it down or told someone else. If it's a person you live with or work closely with, a conversation about privacy might prevent the same problem later. If it's someone you don't trust, changing your passcode is the only real protection.
Also check your Apple ID password and enable two-factor authentication if you haven't already. A passcode protects your phone, but your Apple ID password protects your backups, payment methods, and ability to recover your phone if it's lost. Those deserve the same attention.
Frequently Asked Questions
Can I change my passcode without entering the old one?
No. iPhone requires you to enter your current passcode twice during the change process — once to unlock the Passcode settings, and once more before you create the new one. This prevents someone from changing your passcode if they briefly get hold of your unlocked phone.
Will changing my passcode affect my backups or data?
No. Your passcode only unlocks your phone. Changing it doesn't touch your photos, messages, apps, or backups. Everything stays exactly where it is — only the code you use to unlock the device changes.
What if I change my passcode and then forget the new one?
You'll need to erase your phone through Find My or recovery mode, then set it up again. There's no way to recover a forgotten passcode without erasing. This is why writing it down or saving it to iCloud Keychain matters — losing it means losing access to your entire phone.
Can I use the same passcode I used before?
Yes, technically you can, but there's no reason to. If you're changing your passcode because someone learned it, using the same code defeats the purpose. If you're just updating it, pick something new.
Does changing my passcode log me out of apps?
No. Your passcode is separate from your app passwords and Apple ID. Changing your phone's passcode won't log you out of email, social media, banking apps, or anything else. You'll stay signed in to everything.