Enter your passcode on the lock screen

When your iPhone is locked, the screen shows a keypad or number grid. Look at the bottom of the screen — you will see either a numeric keypad (numbers 0–9) or a full keyboard, depending on your iPhone model and settings.

Tap each digit of your passcode in order. As you enter each number, a dot appears on the screen instead of the actual digit, for security. After you enter all the digits, the phone unlocks automatically — you do not need to press an "Enter" or "OK" button.

If you enter the wrong passcode, the screen will say "iPhone is locked" and show how many attempts you have left. After six wrong attempts, you must wait one minute before trying again. After ten wrong attempts, the wait time increases to five minutes, then fifteen minutes, then one hour.

Use Face ID or Touch ID if you have set them up

Many iPhones unlock faster with Face ID (facial recognition) or Touch ID (fingerprint). If you have either enabled, you can unlock without typing your passcode at all.

For Face ID, simply look at your phone. The camera scans your face and unlocks the phone in less than a second. For Touch ID, place your registered finger on the home button (older iPhones) or the side button (newer models). The phone unlocks when it recognizes your fingerprint.

If Face ID or Touch ID fails, the phone will ask for your passcode instead. This is the backup method, and it always works if you remember your passcode.

Key Takeaways

  • Tap your passcode digits on the lock screen keypad — the phone unlocks automatically after you enter all digits.
  • Each wrong attempt locks you out for an increasing amount of time, starting at one minute after the sixth wrong try.
  • Face ID and Touch ID unlock your phone without typing if you have set them up, but your passcode is the backup method.
  • The dots that appear as you type hide your passcode from anyone watching your screen.

What to do if you forget your passcode

If you cannot remember your passcode, you cannot unlock the phone by typing it. At this point, you will need to erase the phone and set it up again using your Apple ID and password, or restore it from a backup.

You can do this through iCloud (Apple's online service) from another device, or by connecting your iPhone to a computer with iTunes or Finder. Both methods erase the phone completely, so you lose any data that was not backed up. If you have a recent backup, you can restore your photos, messages, and apps after the phone is erased.

Why your iPhone asks for your passcode sometimes

Even if you have Face ID or Touch ID turned on, your iPhone will ask for your passcode in certain situations. This is a security feature. You will be asked to type your passcode after you restart your phone, after you have not unlocked it for 48 hours, or after you have not used Face ID or Touch ID for six days.

You may also be asked for your passcode if you try to unlock the phone too many times with the wrong face or fingerprint. This prevents someone else from using your biometric data to break in.

How to change your passcode

Open the Settings app and tap "Face ID & Passcode" or "Touch ID & Passcode" (the name depends on your iPhone model). You will need to enter your current passcode first. Then tap "Change Passcode" and follow the prompts to enter a new one.

You can choose a six-digit passcode (the default), a four-digit passcode, or a custom passcode with letters and numbers. A longer passcode with mixed characters is more secure, but harder to remember. Write it down and store it somewhere safe if you choose a complex one.

Passcode length and security trade-offs

Apple defaults to a six-digit passcode because it balances security with usability. A four-digit code is easier to remember and faster to type, but there are only 10,000 possible combinations. A six-digit code has one million possible combinations, making it much harder to guess.

Custom passcodes with letters, numbers, and symbols offer the highest security but are the hardest to remember and type. If you choose a custom passcode, consider using a password manager to store it securely, or write it down and keep it in a safe place away from your phone.

Frequently Asked Questions

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

After six wrong attempts, your iPhone locks for one minute. After ten wrong attempts, it locks for five minutes. After more attempts, the lockout time increases to fifteen minutes, then one hour. If you reach a certain number of failed attempts, the phone may erase itself — this depends on your settings.

Can I unlock my iPhone without my passcode?

No, not without erasing the phone first. If you forget your passcode, you must erase the phone through iCloud or a computer, then set it up again with your Apple ID. This is why Apple makes passcodes so important — they are the main security feature that protects your data.

Does Face ID work in the dark?

Yes. Face ID uses infrared technology, not visible light, so it works in complete darkness. It also works with glasses, hats, and masks that cover part of your face, though it may be slower or ask for your passcode as a backup.

Can someone unlock my iPhone if they know my passcode?

Yes, they can unlock it and access everything on the phone. This is why you should keep your passcode private and not write it down where others can see it. If you think someone knows your passcode, change it immediately in Settings.

Is a passcode the same as a PIN?

A PIN is a type of passcode — it means a personal identification number made of digits only. On iPhones, "passcode" is the broader term that includes numeric PINs, four-digit codes, six-digit codes, and custom alphanumeric codes with letters and symbols.