Create a passcode during initial setup or add one later
When you first turn on a new iPhone, the setup screen asks you to create a six-digit passcode. If you skip this step, you can add a passcode anytime by going to Settings > Face ID & Passcode (or Touch ID & Passcode on older models) and tapping "Turn Passcode On." Either way, you'll be asked to enter a code twice to confirm it matches.
The default is a six-digit numeric code. Most people find this sufficient for everyday use. If you want something longer or more complex — mixing letters, numbers, and symbols — you can choose "Custom Alphanumeric Code" instead of the default option. The tradeoff is that longer codes take more time to enter every time you unlock your phone, but they're harder for someone else to guess.
Key Takeaways
- A six-digit numeric passcode is the iPhone default and works well for most people who also use Face ID or Touch ID.
- You can switch to a longer alphanumeric code in Settings > Face ID & Passcode > Change Passcode if you want more security.
- Your passcode is the backup unlock method if Face ID or Touch ID fails, so choose something you can remember under stress.
- Never use obvious numbers like your birth year, address, or repeating digits — these take seconds to crack.
- If you forget your passcode, you'll need to erase the phone and restore it from a backup, so write it down somewhere safe offline.
The difference between a passcode and Face ID or Touch ID
Your passcode is the master unlock method. Face ID (the camera system that recognizes your face) and Touch ID (the fingerprint sensor) are faster ways to unlock your phone, but they both require a passcode as a backup. If your face is covered, your finger is wet, or the sensor fails, you'll type your passcode instead.
This means your passcode is the real security layer. Face ID and Touch ID are convenience features that sit on top of it. Someone who steals your phone can't use your face or fingerprint to unlock it if they don't know your passcode — they're locked out completely.
Choose a code you can actually remember
The strongest passcode in the world is useless if you forget it under pressure. If your phone is locked and you need to make an emergency call, you won't have time to think. Pick something you can type without hesitation, even if you're stressed or in a hurry.
Avoid patterns that are straightforward to guess: your birth year, your address, repeating digits (1111), sequential numbers (1234), or keyboard patterns (like 2580 or 1357). These take seconds to crack. Instead, use a mix of numbers that have personal meaning but aren't obvious — like the month and day you moved to your current house, or a number from a childhood memory that only you would know.
If you choose an alphanumeric code, the same rule applies. "Password123" or "iPhone2024" are common enough that they appear in password-cracking dictionaries. A random mix like "Tr7$mK2" is stronger, but only if you can remember it without writing it down on a sticky note on your monitor.
Where to store your passcode safely
Write your passcode down and keep it somewhere offline and physically find — a locked drawer, a safe, or a notebook you keep at home. Do not store it in your phone's Notes app, your email, or any cloud service. If someone gains access to your phone or your email account, they'll find it when ready.
If you use a password manager like 1Password or Bitwarden, you can store your iPhone passcode there, but only if the password manager itself is protected by a strong master password. The goal is to have a backup record in case you forget, not to make it easier for someone else to find.
How to change your passcode later
Go to Settings > Face ID & Passcode (or Touch ID & Passcode). Tap "Change Passcode" at the top. You'll be asked to enter your current passcode first, then enter your new one twice. The system won't let you use a passcode you've used recently, so if you change it often, you'll need to pick something genuinely different each time.
Change your passcode if you think someone saw you enter it, if you used an obvious number and want something stronger, or if you shared your phone with someone and want a fresh code. There's no penalty for changing it frequently — it takes less than a minute.
What happens if you forget your passcode
If you enter the wrong passcode too many times, your iPhone will lock you out temporarily. After the first few wrong attempts, you'll see a message saying "iPhone is disabled" and a timer telling you how long to wait before trying again. The wait time increases with each failed attempt — eventually reaching hours.
If you've locked yourself out completely and can't remember the code, your only option is to erase the phone and set it up again. You can do this through iCloud.com (Find My iPhone) or by connecting to a computer with Finder (Mac) or iTunes (Windows). You'll lose any data that wasn't backed up, so this is why keeping a written record of your passcode matters.
Why your passcode matters for your data, not just your phone
Your passcode protects more than just unlocking your screen. It's also the key to your Apple ID, your payment methods, and any sensitive information stored on your phone — photos, messages, banking apps, health data. Someone with your passcode can change your Apple ID password, lock you out of your own account, or access your stored payment cards.
This is why a passcode that's hard to guess is worth the extra few seconds it takes to enter. It's not about preventing a stranger from scrolling through your photos. It's about preventing someone from taking over your accounts or accessing information that could be used to commit fraud.
Frequently Asked Questions
Can I use a four-digit passcode instead of six digits?
Yes. When you set up your passcode, you can choose "Custom Numeric Code" and enter any length you want. A four-digit code is faster to enter but much easier to crack — someone has only 10,000 possible combinations to try. Six digits gives you 1 million combinations. The extra two digits take about two seconds to type but make a real difference in security.
What if I want to remove my passcode entirely?
You can turn off your passcode in Settings > Face ID & Passcode, but this is not recommended. Without a passcode, anyone who picks up your phone can access everything on it — your email, your photos, your banking apps, your payment methods. Even if you use Face ID every day, you need a passcode as a backup for situations when Face ID doesn't work.
Is a longer passcode always better than Face ID?
They work together, not against each other. Face ID is faster for everyday unlocking, but your passcode is the real security. A long alphanumeric passcode is more find than a short numeric one, but if you can't remember it, you'll end up resetting your phone. Choose the longest code you can reliably remember and type under pressure.
Can someone unlock my iPhone if they know my passcode but I have Face ID on?
Yes. Your passcode is always a valid way to unlock your phone, whether Face ID is on or off. This is by design — it's your backup method. If you're worried someone knows your code, change it when ready in Settings > Face ID & Passcode > Change Passcode.
Should I tell anyone else my passcode?
Only tell someone your passcode if you absolutely trust them and have a specific reason — like a family member who needs to unlock your phone in an emergency. Don't share it with friends, coworkers, or service technicians. If someone at an Apple Store needs to access your phone, they can do so through your Apple ID without knowing your passcode.