Your iPhone usually asks for six digits because that is the default passcode format—not because six digits are always required. On an unmanaged iPhone, you can generally choose a four-digit code by tapping Passcode Options during setup or when changing your passcode. If that option is missing or the phone rejects the code, a work, school, or Exchange policy may require a longer or more complex passcode.
Why iPhone defaults to six digits
A six-digit code is the standard option in the iPhone passcode setup flow. You need to tap Passcode Options to select another format, such as a 4-Digit Numeric Code, a custom-length numeric code, or a custom alphanumeric code.
Six digits also allow more possible combinations. If each digit can be any number from 0 to 9, a four-digit code has 10,000 possible combinations, while a six-digit code has 1,000,000—100 times as many. This does not mean someone can freely try every possibility; iPhone security limits passcode attempts.
How to set a four-digit iPhone passcode
- Open Settings.
- Tap Face ID & Passcode on an iPhone with Face ID, or Touch ID & Passcode on an iPhone with Touch ID. Some older models may show Passcode.
- Enter your current passcode.
- Tap Change Passcode and follow any prompt to enter your current code.
- Tap Passcode Options, then choose 4-Digit Numeric Code.
- Enter your new code and enter it again to confirm.
During initial setup, tap Passcode Options when the six-digit prompt appears, then choose 4-Digit Numeric Code.
Why the four-digit option may be missing or rejected
A work- or school-managed iPhone may have a configuration profile, mobile-device-management policy, or Exchange policy that sets a minimum passcode length or requires a particular type of code. If multiple policies apply, the stricter requirements are enforced.
- If the iPhone is managed, contact your organization’s IT administrator to ask whether the passcode policy can be changed.
- If it is not managed, select the format from Passcode Options. Simply entering fewer digits in a flow that expects six does not switch the passcode to four digits.
If you have forgotten your current passcode, you cannot use the normal Change Passcode flow. On iOS 17 or later, if you changed your passcode within the previous 72 hours, Apple’s Passcode Reset feature may let you use your previous passcode once to regain access and set another one. Otherwise, regaining access generally requires erasing and resetting the iPhone. You can restore your data from a backup if one is available.
What the passcode prompt does—and does not—mean
If you are entering an existing passcode, the expected format matches the code already set on the iPhone. To change its length, use Change Passcode and choose a format under Passcode Options.
Face ID and Touch ID do not replace your device passcode. Your iPhone may require the passcode after a restart or after repeated unsuccessful Face ID or Touch ID attempts. Those requirements determine when you must enter the passcode, not how many digits it must contain.
Your device passcode is also separate from your Apple Account password. Setting a device passcode enables data protection for information stored on your iPhone.
Is a four-digit passcode secure enough?
A four-digit code is quicker to enter, but it has fewer possible combinations than a six-digit code. A longer numeric code or a custom alphanumeric code offers a larger range of possibilities. Choose a code that would be difficult for someone who knows you to guess.
- Avoid obvious choices such as repeated digits or sequential patterns.
- Consider a longer numeric code or custom alphanumeric code if you want a stronger option.
- Do not share your device passcode. Someone who knows it may be able to access information or change settings on your iPhone.