What "code" means on an iPhone and where to find each one
iPhone uses three different codes, and the steps to change each one are completely different. Your passcode is the six-digit (or longer) number you enter to unlock your phone. Your Apple ID password is what you use to sign into the App Store, iCloud, and Apple services — it's separate from your passcode and stored on Apple's servers, not your phone. Your Screen Time code is an optional four-digit PIN that locks parental controls and app restrictions.
Most people mean passcode when they say "code," but if you've forgotten which one you need to change, start by trying to unlock your phone. If you can't get past the lock screen, you need a passcode reset. If you can unlock your phone but can't access the App Store or iCloud, you need an Apple ID password reset. If you set up restrictions for apps or downtime and forgot that PIN, you need a Screen Time code reset.
Key Takeaways
- Your iPhone passcode is changed in Settings > Face ID & Passcode (or Touch ID & Passcode on older models), and you'll need your current passcode to start.
- Your Apple ID password is reset through iforgot.apple.com or Settings > [Your Name] > Password & Security, and Apple will send a verification code to your trusted device or email.
- Screen Time code resets require you to enter your Apple ID password, because Apple ties that PIN to your account for security.
- If you've forgotten your passcode entirely and can't unlock your phone, you'll need to erase the phone and set it up again using your Apple ID.
- Changing your passcode takes about two minutes; resetting a forgotten password takes longer because Apple requires verification steps.
How to change your iPhone passcode when you remember it
Open Settings and scroll down to find Face ID & Passcode (on newer iPhones with face recognition) or Touch ID & Passcode (on older models with fingerprint). Tap it. You'll be asked to enter your current passcode — this is the security step that prevents someone else from changing your code if they pick up your phone.
Once you've entered your current passcode, scroll down and tap "Change Passcode." You'll enter your current passcode one more time, then type your new passcode twice to confirm it. Apple will show you a strength meter — a longer passcode (8 digits or more) is stronger than the standard 6 digits, but 6 digits is the minimum. If you want a longer code, tap "Passcode Options" before you enter the new one and choose "Custom Alphanumeric Code" to use letters and numbers.
Your new passcode takes effect when ready. You'll use it the next time you lock and unlock your phone. Write it down somewhere safe if you think you might forget it — there's no way to recover a passcode you've lost without erasing your phone.
How to reset your Apple ID password if you've forgotten it
Go to iforgot.apple.com on any device with a web browser. Enter your Apple ID (usually your email address), then choose how you want to verify your identity. Apple will offer two options: receive a verification code on a trusted device (a phone or computer you've already signed into with this Apple ID) or receive a code by email.
If you choose the trusted device route, Apple sends a six-digit code to that device. Open the notification, copy the code, and paste it back into iforgot.apple.com. If you choose email, check the inbox for the email address linked to your Apple ID and look for a message from Apple. The code in that email is valid for one hour.
Once you've entered the verification code, you'll be asked to create a new password. Apple requires passwords to be at least eight characters long and include uppercase letters, lowercase letters, numbers, and a special character (like ! or @). Type your new password twice to confirm it. Your new password takes effect when ready across all Apple services — the App Store, iCloud, and any other Apple product you use.
How to change your Screen Time code
Open Settings and tap Screen Time. Scroll down to find "Change Screen Time Passcode" and tap it. You'll see two options: "Change Passcode" (if you remember your current Screen Time code) or "Turn Off Screen Time Passcode" (if you want to remove it entirely).
If you remember your code, tap "Change Passcode," enter the old one, then enter your new four-digit code twice. If you've forgotten your Screen Time code, tap "Turn Off Screen Time Passcode" instead. Apple will ask for your Apple ID password — this is the verification step that proves you own the phone. Enter your Apple ID password, and the Screen Time code will be removed. You can then set a new one by going back to Screen Time and tapping "Use Screen Time Passcode."
What to do if you've forgotten your passcode and can't unlock your phone
If you can't remember your six-digit (or longer) passcode and you've used up your unlock attempts, your phone will lock you out temporarily or permanently depending on how many times you've tried. You cannot change a forgotten passcode through Settings because you can't get into Settings without unlocking the phone first.
Your only option is to erase the phone and set it up again. You can do this using Find My iPhone (a web tool at iCloud.com) or by connecting your phone to a computer with iTunes or Finder. Both methods erase everything on the phone, so use this only if you have a backup. When the phone restarts, you'll set it up as new and create a new passcode. You'll need your Apple ID and password to reactivate the phone after the erase.
How to change your code on a family member's iPhone if you manage it
If you're the family organizer in Family Sharing and you manage a child's Screen Time, you can reset their Screen Time code through your own phone. Open Settings, tap Family Sharing, select the child's name, tap Screen Time, then tap "Change Screen Time Passcode." You'll enter your own Apple ID password to verify, and then you can set a new Screen Time code for their phone.
You cannot change a child's iPhone passcode remotely — only they (or you, if you're in front of their phone) can do that through their own Settings. If a child has forgotten their passcode, the phone must be erased using Find My iPhone, and it will need to be set up again with their Apple ID.
Common mistakes that lock you out and how to avoid them
The most common mistake is forgetting your new passcode when ready after changing it. Before you close Settings, unlock your phone once using the new code to make sure you remember it. If you change your passcode and then lock your phone, you won't be able to get back in if you've already forgotten the new one.
Another mistake is changing your Apple ID password and then forgetting it before you've updated it on all your devices. If you sign out of the App Store on your phone before entering the new password, you won't be able to sign back in. Change your Apple ID password on a computer first, write it down, and then update it on your phone and other devices while you still remember it.
A third mistake is confusing your passcode with your Apple ID password. Your passcode unlocks your phone; your Apple ID password unlocks Apple services. If you're locked out of the App Store but can unlock your phone, you need an Apple ID password reset, not a passcode change.
Frequently Asked Questions
Can I use the same passcode I used before?
Yes, but Apple will warn you that you've used this code recently and suggest a different one. If you want to reuse an old passcode anyway, you can ignore the warning and enter it again. This is not recommended for security reasons — a new, unique passcode is stronger.
What happens if I forget my Apple ID password while changing it?
You can reset it again at iforgot.apple.com using the same verification process. Apple doesn't store your old password, so there's no way to recover a forgotten one — you can only create a new one. Keep your new password written down somewhere safe, like a password manager.
Can I change my passcode without entering the old one?
No. You must enter your current passcode before you can change it. This is a security feature that prevents someone else from locking you out of your own phone. If you've forgotten your current passcode, your only option is to erase the phone.
Does changing my passcode affect my Apple ID or iCloud?
No. Your iPhone passcode and Apple ID password are completely separate. Changing one does not change the other. You can change your passcode without touching your Apple ID, and vice versa.
How long does it take to change a code?
Changing your passcode takes about two minutes if you remember the old one. Resetting a forgotten Apple ID password takes longer because Apple sends verification codes and you have to wait for them to arrive by email or on another device. Plan for five to ten minutes for a full Apple ID password reset.