Open Settings and find the passcode menu

To change your iPhone passcode, start by opening the Settings app — the gray icon with gears on your home screen. Scroll down and tap Face ID & Passcode (on newer iPhones) or Touch ID & Passcode (on older models). You'll be asked to enter your current passcode before you can proceed.

If you've forgotten your current passcode, you cannot change it through Settings. You'll need to erase your iPhone and set it up again using your Apple ID, or take it to an Apple Store. There's no way around this — Apple doesn't store your passcode and can't retrieve it for you.

Key Takeaways

  • You must enter your current passcode before you can create a new one through Settings.
  • A standard iPhone passcode is six digits, but you can choose four digits, a custom number, or alphanumeric characters instead.
  • If you forget your passcode, you'll need to erase your iPhone completely and restore it using your Apple ID.
  • Your new passcode takes effect immediately and you'll need it the next time you unlock your phone.

Tap Change Passcode and enter your current code

Once you're in the Face ID & Passcode (or Touch ID & Passcode) menu, tap Change Passcode near the top of the screen. iOS will prompt you to enter your current passcode. Type it in carefully — if you enter it wrong three times, you'll be locked out for a minute before you can try again.

This step exists as a security measure. It confirms that you're the person who owns the phone, not someone who picked it up and is trying to change the lock. Even if your phone is unlocked, anyone trying to change your passcode will hit this barrier.

Create your new passcode

After you enter your current passcode, you'll see a screen asking you to enter your new passcode. By default, iOS expects a six-digit code. Type the six numbers you want to use, then tap Next.

If you prefer a different format, tap Passcode Options before entering your new code. You can choose a four-digit numeric code (faster to type but less secure), a custom numeric code of any length, or an alphanumeric code that includes letters and numbers (most secure, but harder to remember and type). Pick the option that balances security with what you'll actually remember and can type reliably.

Confirm your new passcode

iOS will ask you to enter your new passcode a second time to make sure you didn't make a typo. Type it exactly as you did the first time, then tap Done. Your new passcode is now active.

Test it immediately by locking your phone (press the side button and volume button together, or use the lock screen) and unlocking it with your new code. This catches any mistakes before you walk away from Settings and prevents you from being locked out later.

What happens if you forget your new passcode

If you forget your passcode after changing it, you cannot recover it. You'll need to erase your iPhone completely. Go to Settings > General > Transfer or Reset > Erase All Content and Settings, or use a computer with Finder (Mac) or iTunes (Windows) to restore your phone.

After erasing, you can set up your iPhone again using your Apple ID and password. This is why it's worth writing down your new passcode somewhere safe — not on a sticky note on your monitor, but in a password manager or a locked drawer. The recovery process takes time and erases everything on your phone, so prevention is much easier than recovery.

Why you might want to change your passcode regularly

Changing your passcode occasionally is a reasonable security practice, especially if you think someone may have seen you enter it or if you've used the same code for a long time. However, you don't need to change it constantly — security experts generally recommend changing it only when there's a reason to suspect it's been compromised.

If you're concerned about someone accessing your phone, changing your passcode is a good first step. If you suspect someone has your Apple ID password as well, change that too through your Apple ID account settings on iCloud.com. Doing both closes off multiple ways someone could gain access to your device and your data.

Frequently Asked Questions

Can I use the same passcode I had before?

Yes, iOS will let you reuse an old passcode. However, if you're changing it because you think someone knows it, pick something new instead.

What's the difference between a passcode and Face ID or Touch ID?

Your passcode is a backup. Face ID and Touch ID let you unlock your phone without typing, but if they fail or you restart your phone, you'll need your passcode. You should always have a passcode set, even if you use biometric unlock.

Do I need to change my passcode if I change my Apple ID password?

No. Your iPhone passcode and your Apple ID password are separate. Changing one doesn't affect the other. However, if someone has both, they have more access to your phone and your account, so it's worth changing both if you suspect a breach.

Will changing my passcode affect my stored passwords or data?

No. Your passcode only unlocks your phone. It doesn't change your passwords for apps, email, or websites, and it doesn't affect any data stored on your phone.