Change your passcode through Settings in under two minutes

Open Settings, tap Face ID & Passcode (or Touch ID & Passcode on older models), enter your current passcode, then tap Change Passcode. You'll enter your old passcode once more, then create a new one. The new passcode takes effect when ready.

If you've forgotten your current passcode, you cannot change it directly — you'll need to erase the phone and set it up again. This is intentional: Apple locks you out to prevent someone else from changing your security if they steal your phone. The erase-and-setup path takes longer but gets you back to a working phone with a passcode you control.

Key Takeaways

  • You can change your passcode anytime by going to Settings > Face ID & Passcode, entering your current code, and tapping Change Passcode.
  • Your new passcode must be at least six digits unless you choose a custom numeric code or four-digit code in the passcode options.
  • If you forget your passcode, you must erase the phone through Settings > General > Transfer or Reset, then set it up as new or restore from a backup.
  • A forgotten passcode cannot be recovered or reset by Apple — the erase-and-setup process is the only way forward.

Step-by-step: changing a passcode you remember

Start by opening the Settings app on your home screen. Scroll down and tap Face ID & Passcode (iPhone X and newer) or Touch ID & Passcode (iPhone 8 and earlier). You'll see a prompt asking for your current passcode — enter it.

Once you're in, tap Change Passcode at the top of the screen. The phone will ask you to enter your current passcode one more time. After you do, you'll see the prompt to enter your new passcode. Type it in, then confirm it by typing it again. The phone will show you a confirmation message, and your new passcode is active when ready.

Write down your new passcode somewhere safe if you tend to forget them — a notebook at home, not in your phone's notes app. If you lose it, there is no shortcut to get back in.

Choosing between a six-digit code, four-digit code, or custom passcode

By default, iPhone requires a six-digit passcode. This is stronger than a four-digit code because there are one million possible combinations instead of ten thousand. If you want something shorter or longer, you can change this when you set your new passcode.

When the Change Passcode screen appears, look for Passcode Options at the bottom. Tap it to see three choices: Custom Numeric Code (any length of numbers you choose), Custom Alphanumeric Code (letters and numbers mixed), or 4-Digit Numeric Code. Pick the type you want, then create your code. A four-digit code is faster to type but much easier to guess. A six-digit or longer numeric code is the middle ground most people use.

What to do if you've forgotten your passcode

If you cannot remember your current passcode, you cannot change it — you must erase the phone. This is a security feature: if someone steals your phone, they cannot lock you out by changing the passcode themselves.

To erase and set up again, go to Settings > General > Transfer or Reset. Tap Erase All Content and Settings. The phone will ask you to confirm and may ask for your Apple ID password. Once you confirm, the phone erases completely and restarts as if it's brand new.

When setup begins, you'll reach the passcode screen. Create a new passcode here — this time you'll remember it. You can then restore your data from an iCloud backup or set up as a new phone. If you have a backup, choose Restore from iCloud Backup during setup, sign in with your Apple ID, and pick the backup you want. Your apps, photos, and messages will return, but you'll have a fresh start with a passcode you control.

Why Apple won't reset a forgotten passcode for you

Apple cannot reset your passcode because your phone's data is encrypted with your passcode as part of the key. Even Apple's servers cannot unlock it. This design protects you: if someone calls Apple pretending to be you, they still cannot get into your phone. The tradeoff is that you cannot get in either if you forget.

This is different from resetting a password on a website, where a company can verify your identity and send you a reset link. Your iPhone's encryption happens on the device itself, not on Apple's servers. The only way to regain access is to erase the encrypted data and start over.

How often you should change your passcode

There is no rule that says you must change your passcode on a schedule. Change it if you think someone knows it, if you've used the same code on multiple devices, or if you want a fresh start. If your passcode is strong (six digits or longer) and only you know it, changing it yearly or every few years is enough.

If you share your passcode with family members or caregivers, change it when someone moves out or no longer needs access. If you use the same passcode across an iPhone, iPad, and Mac, consider using different codes on each device so a breach on one does not expose all of them.

Passcodes versus Face ID and Touch ID

Your passcode is the fallback when Face ID or Touch ID fails or is not available. You might use your face or fingerprint dozens of times a day, but your passcode is what unlocks the phone if your face is covered, your hands are wet, or the sensor is not working. A strong passcode matters because it is the last line of defense.

You cannot turn off your passcode entirely on modern iPhones — it is required. You can choose to use only Face ID or Touch ID in daily life, but the passcode stays in the background. This is why changing it when you forget it requires erasing the phone: Apple treats the passcode as the master key to everything on the device.

Frequently Asked Questions

Can I use letters and numbers in my iPhone passcode?

Yes, if you choose Custom Alphanumeric Code when you change your passcode. This creates a code with both letters and numbers, which is harder to guess than numbers alone. You'll type it in using the keyboard that appears on the lock screen.

What happens if I enter the wrong passcode too many times?

After six failed attempts, the phone locks for one minute. After ten failed attempts, it locks for five minutes. After fifteen failed attempts, it locks for fifteen minutes or longer. If you keep failing, the phone eventually forces you to wait an hour or erase itself, depending on your settings.

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

No. Your iPhone passcode and Apple ID password are separate. Changing one does not affect the other. You can change your Apple ID password in Settings > [Your Name] > Password & Security without touching your device passcode.

Will changing my passcode affect my backups or data?

No. Your passcode only unlocks the phone itself. Changing it does not erase anything, affect your iCloud backup, or change your data. Everything stays exactly as it is.

Can I set a passcode longer than six digits?

Yes, if you choose Custom Numeric Code or Custom Alphanumeric Code. You can make it as long as you want. A longer passcode is stronger, but it takes longer to type every time you unlock your phone.