The Basic Steps to Change Your iPhone Passcode
Your iPhone passcode is the four- or six-digit number (or longer alphanumeric code) that unlocks your phone. To change it, open Settings, tap Face ID & Passcode or Touch ID & Passcode, enter your current passcode, then tap Change Passcode. You'll enter your old passcode once more, then create and confirm your new one.
The exact wording in Settings varies slightly depending on your iPhone model and iOS version. Older iPhones use "Touch ID & Passcode." Newer models with Face ID say "Face ID & Passcode." Both lead to the same passcode change screen. The process takes less than two minutes once you're in the right menu.
If you've forgotten your current passcode, you cannot change it directly—you'll need to erase your iPhone and set it up again using your Apple ID. This is a security feature that prevents someone else from accessing your phone if they gain physical access to it. The erase-and-restore process is covered in detail later in this guide.
Key Takeaways
- Go to Settings, then Face ID & Passcode (or Touch ID & Passcode on older models), and select Change Passcode to update your code.
- You must enter your current passcode before you can create a new one.
- Your new passcode can be four digits, six digits, or a custom alphanumeric code—you choose the length when you set it.
- If you forget your passcode, you cannot change it; you must erase and restore your iPhone using your Apple ID instead.
- Changing your passcode does not affect your data, apps, or biometric unlock methods like Face ID or Touch ID.
Choosing Between Passcode Types
When you change your passcode, iOS offers three options: a four-digit numeric code, a six-digit numeric code, or a custom alphanumeric code. The six-digit option is the default and offers more security than four digits. A custom code can include letters, numbers, and symbols, making it the most secure but also harder to remember.
If you select Custom Alphanumeric Code, you can make it as long as you want. Most people choose six digits as a balance between security and memorability. Whatever you choose, write it down and store it somewhere safe—not on your phone or in a note app on your phone. A physical notebook kept in a drawer or a password manager on a separate device works well.
What Happens When You Change Your Passcode
Changing your passcode does not affect your data, apps, or settings. Your photos, messages, contacts, and everything else on your phone stays exactly as it is. Only the code you use to unlock your phone changes. You won't lose access to anything, and no apps will need to be reinstalled.
If you use Face ID or Touch ID to unlock your phone, changing your passcode does not disable those features. You'll still be able to unlock with your face or fingerprint, and your passcode remains the backup method if biometric unlock fails. This means you can change your passcode without any disruption to your daily phone use.
If You Forget Your New Passcode
If you change your passcode and then forget it, you have one option: erase your iPhone and restore it. This removes all data from the phone unless you have a backup. You can then restore from an iCloud or computer backup using your Apple ID. The restore process can take anywhere from 30 minutes to several hours depending on how much data you have.
To erase your iPhone without knowing the passcode, you need access to your Apple ID account. Go to iCloud.com, use Find My iPhone, select your device, and choose Erase iPhone. After erasing, you can restore from a backup or set up as new. If you don't have a backup, you'll lose any data that wasn't synced to iCloud.
This is why keeping a written record of your passcode in a secure location (not digitally stored on your phone) is important. If you lose both your passcode and access to your Apple ID, you will need to contact Apple Support or visit an Apple Store with proof of purchase. Having proof of ownership speeds up the process significantly.
Passcode vs. Apple ID Password
Your iPhone passcode and your Apple ID password are two separate things. Your passcode unlocks your phone. Your Apple ID password unlocks your account on Apple's servers and is used for the App Store, iCloud, and other Apple services. They serve different purposes and are stored in different places.
Changing one does not change the other. If you want to change your Apple ID password, you do that through Settings > [Your Name] > Password & Security > Change Password, or through appleid.apple.com on a web browser. Both changes are worth doing periodically for security. You can change them on the same day or at different times—there's no requirement to do them together.
Frequently Asked Questions
Can I change my passcode without entering the old one?
No. iOS requires you to enter your current passcode before you can set a new one. This prevents someone who briefly has access to your unlocked phone from changing your passcode and locking you out.
Will changing my passcode affect Face ID or Touch ID?
No. Your biometric unlock methods stay active. Your passcode is the backup unlock method if Face ID or Touch ID fails. Changing the passcode does not disable either biometric feature.
What if I want a longer or shorter passcode?
When you tap Change Passcode, you can select a different type: four digits, six digits, or custom alphanumeric. You can switch between these types each time you change your code. There is no limit to how long a custom alphanumeric code can be.
Does changing my passcode delete anything on my phone?
No. Your photos, apps, messages, contacts, and all other data remain unchanged. Only the unlock code changes.
Can I use the same passcode I used before?
iOS does not prevent you from reusing an old passcode. However, for security reasons, it's better to choose something new each time you change it.