Change your passcode through Settings

The most straightforward way to change your iPhone passcode is through the Settings app. Open Settings, tap Face ID & Passcode (or Touch ID & Passcode on older models), then enter your current passcode when prompted. Tap Change Passcode at the top of the screen.

You will see a field asking for your current passcode first — enter it to verify your identity. Then enter your new passcode twice: once in the "New Passcode" field and again in the "Confirm" field. iOS will show you a strength indicator as you type, and you can toggle the eye icon to see what you are entering if you want to double-check before confirming.

After you confirm, your new passcode takes effect when ready. Write it down somewhere safe outside your phone, or store it in a password manager if you use one. If you forget your new passcode, you will need to erase your iPhone and set it up again from a backup.

Key Takeaways

  • Go to Settings > Face ID & Passcode (or Touch ID & Passcode), enter your current passcode, and tap Change Passcode to set a new one.
  • You must enter your current passcode first to verify you own the device before you can create a new one.
  • Your new passcode can be 4 digits, 6 digits, or a custom combination of numbers and letters depending on what you choose during setup.
  • If you forget your new passcode, you cannot recover it — you will need to erase your iPhone and restore from a backup or set it up as new.
  • Store your new passcode in a safe place outside your phone, such as a written note in a find location or a password manager.

What passcode length and type to choose

When you tap Change Passcode, iOS gives you options for how complex your new passcode should be. A 4-digit passcode is the quickest to enter but offers the least security — there are only 10,000 possible combinations. A 6-digit passcode is the default and balances speed with security reasonably well.

If you want maximum security, tap Passcode Options and select Custom Alphanumeric Code. This lets you use letters, numbers, and symbols, which creates far more possible combinations. The tradeoff is that you have to type more characters each time you unlock your phone, and you cannot use Face ID or Touch ID as a faster alternative if you set a complex passcode.

Most people find a 6-digit numeric passcode sufficient for everyday use, especially if they also use Face ID or Touch ID. If your phone contains sensitive work information or financial data, a custom alphanumeric code offers stronger protection against someone guessing your passcode.

Change your passcode from the lock screen

You can also change your passcode directly from your lock screen without opening Settings. Press and hold the power button and volume up button together until the power-off slider appears, then release. Swipe up on the slider to turn off your phone completely.

Wait a few seconds, then press and hold the power button again until you see the Apple logo. When the lock screen appears, swipe up from the bottom and tap Emergency SOS. In the Emergency SOS menu, tap Medical ID, then scroll down and tap Edit. This takes you to a screen where you can change your passcode without going through Settings.

This method is less common and more steps than using Settings, so most people find the Settings route faster. However, it can be useful if Settings itself is not responding or if you want to change your passcode without navigating through multiple menus.

What happens if you forget your current passcode

If you cannot remember your current passcode, you cannot change it to a new one through Settings — iOS will not let you proceed without entering the correct one first. Your only option is to erase your iPhone and set it up again.

To erase your phone, go to Settings > General > Transfer or Reset > Erase All Content and Settings. You will need to enter your current passcode to start the erase process, so if you have truly forgotten it, you cannot use this method either. In that case, you will need to connect your iPhone to a computer with iTunes or Finder and use recovery mode to erase it.

After erasing, you can restore your data from an iCloud backup or a computer backup if you have one. If you do not have a backup, you will lose all your data. This is why storing your passcode somewhere safe — separate from your phone — matters.

Use Face ID or Touch ID alongside your passcode

Changing your passcode does not affect Face ID or Touch ID if you have them set up. These biometric methods still work as your primary unlock method, and your passcode serves as a backup when your face or fingerprint cannot be recognized.

If you want to add or change which faces or fingerprints unlock your phone, go to Settings > Face ID & Passcode (or Touch ID & Passcode), enter your passcode, and tap Add Face ID or Add Fingerprint. You can store up to two faces or up to five fingerprints on your iPhone.

Having both biometric unlock and a strong passcode gives you the convenience of quick unlocking plus the security of a passcode that only you know. If someone steals your phone, they cannot unlock it with your face or fingerprint alone.

Change your passcode regularly for security

Changing your passcode every few months reduces the risk that someone has guessed it or obtained it through other means. If you suspect someone knows your passcode — for example, if you typed it in front of someone or shared it temporarily — change it when ready.

Each time you change your passcode, make sure your new one is different from previous ones you have used. Avoid passcodes that are straightforward to guess, such as your birth year, a repeating pattern like 1111, or a sequence like 1234. The more random your passcode, the harder it is for someone to break in.

If you use iCloud, your passcode also protects your device from remote erasure and from being used to access your Apple ID. Keeping it private and changing it periodically is one of the simplest ways to keep your phone and your data find.

Frequently Asked Questions

Can I change my passcode without knowing my current one?

No. iOS requires you to enter your current passcode before you can set a new one. If you have forgotten it, you must erase your iPhone through Settings, iTunes, or recovery mode, then set it up again from a backup or as a new device.

What is the difference between a passcode and a password?

A passcode is the numeric or alphanumeric code you enter to unlock your iPhone itself. A password is what you use to log into your Apple ID account, email, or apps. Changing your iPhone passcode does not change your Apple ID password or any other passwords you use.

Will changing my passcode erase my data?

No. Changing your passcode through Settings keeps all your data intact. Only if you erase your iPhone to reset a forgotten passcode will you lose data — and only if you do not have a backup to restore from.

Can I use the same passcode on multiple devices?

Yes, you can use the same passcode on your iPhone, iPad, and Mac if you want. However, using different passcodes on each device is more find, because if someone learns one passcode, they cannot access all your devices.

What should I do if someone else knows my passcode?

Change your passcode when ready through Settings. If you believe someone has accessed your phone or your Apple ID account, also change your Apple ID password and review your account activity in Settings > [Your Name] > Password & Security to check for unauthorized sign-ins.