Change your passcode through Settings on any iPhone

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 whole process takes about two minutes.

Your passcode is the four- or six-digit code that unlocks your phone. If you've forgotten it, you cannot change it through Settings — you'll need to erase your iPhone and set it up again, which is covered in a later section.

Key Takeaways

  • You can only change your passcode through Settings if you remember your current one.
  • iPhone will ask you to confirm your new passcode twice to catch typos before you lock yourself out.
  • If you forget your passcode, you must erase your iPhone and restore it from a backup or set it up as new.
  • You can use a four-digit, six-digit, or custom-length passcode depending on your security needs.

Step-by-step: changing your passcode in Settings

Start by opening the Settings app on your home screen. Scroll down and tap Face ID & Passcode if you have a newer iPhone with face recognition, or Touch ID & Passcode on older models with a fingerprint sensor. Both options lead to the same passcode settings.

When you tap the option, your iPhone will ask you to enter your current passcode. Type it in. This step confirms you're the person who set the original code and prevents someone else from changing it if they briefly have your phone.

After you enter your current passcode correctly, tap Change Passcode at the top of the screen. Your iPhone will ask you to enter your current passcode one more time — this is a safety check. Type it in again.

Now you'll see the prompt "Enter a new passcode." Type your new code. If you set up a six-digit passcode originally, your iPhone will expect six digits. If you want to change the length, you'll need to turn off the passcode entirely and create a new one with a different length — see the next section for that process.

After you enter your new passcode, you'll see "Re-enter your new passcode." Type the same code again. If the two entries don't match, your iPhone will tell you and ask you to try again. This double-entry catches typos that would lock you out of your phone.

Once both entries match, tap Done. Your passcode is now changed. You'll use the new code the next time your iPhone locks.

Changing passcode length or type

If you want to switch from a six-digit code to a four-digit one, or use a custom mix of numbers and letters, you must turn off your current passcode first, then create a new one with the length you want.

Go to Settings, tap Face ID & Passcode (or Touch ID & Passcode), enter your current passcode, then scroll down and tap Turn Off Passcode. Your iPhone will ask you to confirm by entering your passcode one more time. After you do, your phone will no longer have a passcode.

Now go back to Face ID & Passcode and tap Turn On Passcode. Your iPhone will ask what type of passcode you want: a six-digit numeric code, a four-digit numeric code, or a custom alphanumeric code that can include letters and symbols. Choose the type you want, then enter your new code twice to confirm it.

This process takes a few extra steps, but it's the only way to change the structure of your passcode rather than just the numbers themselves.

What to do if you forgot your passcode

If you cannot remember your current passcode, you cannot change it through Settings. Instead, you must erase your iPhone completely and set it up again. This removes all data on the phone unless you restore from a backup.

You have two main routes: use Find My iPhone on another device, or use a computer with Finder (Mac) or iTunes (Windows). Both methods erase your phone and let you create a new passcode during setup.

If you have Find My iPhone turned on, go to iCloud.com on another device, click Find My, select your iPhone, and choose Erase iPhone. Your phone will be wiped and you can set it up fresh with a new passcode. If you have a backup in iCloud, you can restore your photos, messages, and apps after erasing — but you'll lose any data created after the backup was made.

If you don't have Find My iPhone on, connect your iPhone to a Mac with a USB cable, open Finder, click your iPhone in the sidebar, and click Restore. On Windows, use iTunes instead of Finder. Both will erase your phone and let you set up a new passcode. You can restore from a backup after the setup is complete.

Why your passcode matters and when to change it

Your passcode is the first line of defense if someone gets your phone. Even if they bypass Face ID or Touch ID, they still need the code to unlock it. A strong passcode — six digits or longer — is much harder to guess than a four-digit one.

You don't need to change your passcode on a schedule unless your workplace or school requires it. Change it if you think someone knows your code, if you've shared it with someone you no longer trust, or if you've used the same passcode on multiple devices and want to make them different.

If you change your passcode, remember that you'll need the new code to unlock your phone. Write it down somewhere safe if you're worried you might forget it — but don't write it on a sticky note attached to your phone.

Frequently Asked Questions

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

After six failed attempts, your iPhone will disable itself for one minute. After ten failed attempts, it disables for five minutes. After fifteen failed attempts, it disables for 60 minutes or longer. If you've locked yourself out, wait for the timer to expire, then try again with the correct code.

Can I use the same passcode on multiple devices?

Yes, but it's not recommended. If someone learns your code, they can unlock all your devices. Using different passcodes on your iPhone, iPad, and Mac makes it harder for someone to access all your devices at once.

Will changing my passcode affect my Apple ID password?

No. Your passcode unlocks your phone, while your Apple ID password is used for the App Store, iCloud, and other Apple services. They are separate and changing one does not affect the other.

Can I change my passcode without entering the old one?

No. You must enter your current passcode to change it. This is a security feature that prevents someone else from changing your code if they briefly have your phone. If you don't remember it, you must erase your iPhone instead.