Change Your iPhone Passcode Through Settings

Open the Settings app on your iPhone, then tap Face ID & Passcode (or Touch ID & Passcode on older models). You will be asked to enter your current passcode. Once you do, tap Change Passcode at the top of the screen. Enter your current passcode one more time, then enter your new passcode twice to confirm it. That's it — your passcode is now changed.

The entire process takes about a minute. Your new passcode takes effect when ready, so write it down or save it somewhere safe before you close Settings. If you forget it after changing it, you will need to erase your iPhone and set it up again, which is why keeping a record matters.

Key Takeaways

  • Go to Settings, then Face ID & Passcode (or Touch ID & Passcode), and tap Change Passcode to start the process.
  • You must enter your current passcode twice and your new passcode twice before the change takes effect.
  • Your new passcode works when ready — do not close Settings until you have written it down or saved it somewhere.
  • If you forget your new passcode, you cannot recover it; you will have to erase your iPhone and set it up from scratch.
  • A strong passcode is at least six digits, or longer if you use a custom alphanumeric code instead of numbers only.

What Happens If You Forget Your Current Passcode

If you cannot remember your current passcode, you cannot change it through Settings — the system will not let you proceed without entering the old one first. Your only option is to erase your iPhone and set it up again. You can do this through Settings by going to General, then Transfer or Reset, then Erase All Content and Settings. This wipes everything on your phone.

Before you erase, make sure you have a backup. If you use iCloud, your data is already backed up if you turned on iCloud Backup. If you use a computer, connect your iPhone to a Mac or PC and back it up through Finder (Mac) or iTunes (Windows) before erasing. After the erase completes, you can restore from your backup and set a new passcode during setup.

Choosing a Passcode You Will Remember

iPhone offers three passcode types: a six-digit number (the default), a four-digit number, or a custom alphanumeric code with letters and numbers. The longer and more random your passcode, the harder it is to guess, but it also has to be something you can actually remember. A six-digit code is a good middle ground — longer than four digits but short enough to type without thinking.

Avoid using birthdates, anniversaries, or sequences like 123456. If you choose a custom alphanumeric code, write it down and store it somewhere physically safe, like a locked drawer or a safe. Do not store it in a note on your phone itself — if someone gets into your phone, they can read it. A password manager app like 1Password or Bitwarden can also store your passcode securely if you use one.

The Difference Between Passcode and Password

Your passcode is what you enter on your iPhone's lock screen to unlock the device itself. Your password is what you use to sign into your Apple ID account (the account that backs up your data, stores your photos, and handles purchases). Changing your passcode does not change your Apple ID password, and vice versa.

If you need to change your Apple ID password instead — because you think someone knows it, or you want to update it for security — you do that through Settings by tapping your name at the top, then Password & Security, then Change Password. That is a separate process from changing your passcode.

Why You Might Want to Change Your Passcode

You should change your passcode if someone has seen you enter it, if you have shared it with someone you no longer trust, or if you think your phone has been compromised. You might also change it straightforward because you want a new one — there is no rule about how often you have to do it, but security experts generally suggest changing important codes every few months if you use them frequently.

If you suspect someone has accessed your phone without permission, change your passcode right away, then go to Settings, tap Privacy, and review which apps have permission to access your location, contacts, photos, and other sensitive data. You may want to turn off permissions you no longer need.

What to Do If You Are Locked Out of Your iPhone

If you enter the wrong passcode too many times, your iPhone will lock you out temporarily. After the first few wrong attempts, you will see a message saying "iPhone is disabled." The wait time starts at one minute and doubles with each failed attempt — so after several tries, you might be locked out for 15 minutes, then an hour, then longer. Do not keep guessing; just wait.

If you are locked out and cannot remember your passcode at all, your only option is to erase the phone through iCloud or a computer. Go to iCloud.com, sign in with your Apple ID, open Find My, select your iPhone, and choose Erase iPhone. This will wipe the device and let you set it up again with a new passcode. You will need your Apple ID password to do this.

Using Face ID or Touch ID Instead of Typing a Passcode

You do not have to type your passcode every time you unlock your phone. If your iPhone has Face ID (iPhone X and newer), you can unlock it by looking at the screen. If it has Touch ID (iPhone 5s through iPhone 8), you can unlock it with your fingerprint. Both work alongside your passcode — the passcode is still there as a backup if Face ID or Touch ID fails.

To set up Face ID or Touch ID, go to Settings, tap Face ID & Passcode or Touch ID & Passcode, enter your passcode, then tap Add a Face or Add a Fingerprint. You can add up to five fingerprints or two faces. Even with Face ID or Touch ID turned on, you still need a passcode — it is the fallback when biometric unlock does not work, and it is required for certain sensitive actions like changing your Apple ID password.

Frequently Asked Questions

Do I have to use a six-digit passcode, or can I use four digits?

You can use four digits if you want, though six is the default because it is harder to guess. When you tap Change Passcode, you will see an option to use a custom numeric code or a custom alphanumeric code. Choose whichever length and type you prefer.

What if I change my passcode and then when ready forget the new one?

You will have to erase your iPhone and set it up again. This is why you should write down or save your new passcode before closing Settings. If you use a password manager, add it there right away.

Does changing my passcode affect my Apple ID or my backups?

No. Your passcode only unlocks your phone. Your Apple ID password and your iCloud backups are separate. Changing your passcode will not affect either one.

Can I change my passcode if my iPhone is disabled after too many wrong attempts?

No. You have to wait out the lockout timer, or erase your phone. You cannot access Settings to change your passcode while the phone is disabled.

Is it safe to use the same passcode on my iPhone and my iPad?

It is safe in the sense that it will work, but it is not ideal for security. If someone learns one passcode, they can unlock both devices. If you use multiple Apple devices, consider using different passcodes on each one.