Open the unlock-code setting on the device in front of you and read the length it asks for before handing it over.
Key takeaways for device unlock code length and retry limits
- The Windows Hello for Business policy settings page states the lowest number you can configure for this policy setting is 4, according to Microsoft. This figure represents a configurable minimum rather than a fixed length that every device accepts.
- NIST Special Publication 800-63B requires authenticators using activation secrets to be at least four characters in length, while recommending six characters, according to NIST.
- The same NIST document specifies that the authenticator or verifier SHALL implement a retry-limiting mechanism limiting consecutive failed activation attempts to no more than 10, according to NIST.
- For Android devices, the screen lock guidance advises entering 4 or more numbers for a PIN, but recommends a 6 digit PIN for added security, according to Google.
What to check on an unlock code before a device is handed over
The person setting the code must verify the specific length and retry cap for the operating system currently displayed. On Android devices, the screen lock page states that a PIN requires entering 4 or more numbers, but recommends a 6-digit PIN for added security, according to Google. This recommendation applies specifically to the "Set screen lock on an Android device" context provided by that source. Do not assume this numeric range applies to other operating systems or online account passwords. The local device unlock code is distinct from any cloud-based credential; the rules governing one do not automatically govern the other. When configuring a phone for staff use, confirm whether the interface presents the 4-number minimum as a hard requirement or as a starting point for a longer sequence. The source explicitly notes that 6 digits are recommended for enhanced security, implying that longer codes are acceptable within the same framework. Verify if your specific hardware allows entry beyond these stated figures. If the device is a laptop rather than a phone, the applicable rules may differ entirely, as no single publisher's sentence serves as a universal standard for all products. Check the specific help documentation for the exact model you are holding. Do not rely on generic advice that might conflate different security layers. Focus strictly on the input field visible on the screen right now. Confirm the character count limit imposed by the current software version. If the prompt specifies a minimum, note whether it also specifies a maximum. The goal is to match the physical device's actual requirements with the documented guidance for that specific platform. Avoid transferring assumptions from one vendor's policy to another without verification. Document the exact length requested by the interface. Note any warnings about insufficient complexity displayed on the screen. Proceed only when the entered code meets the visible criteria.
How long each publisher says the code must be
The Windows Hello for Business policy settings page defines specific bounds for PIN configuration. An administrator can set the lowest number for this policy setting to 4, according to Microsoft. This is a configurable minimum, not the only length a device will accept. If you disable or do not configure this policy setting, the PIN length must be greater than or equal to 6, according to Microsoft. The largest number you can configure for this policy setting is 127, according to Microsoft. These figures apply specifically to the Windows Hello for Business policy settings and do not dictate lengths for other operating systems.
NIST Special Publication 800-63B provides guidelines for authenticators that use activation secrets. Such authenticators SHALL require the secrets to be at least four characters in length, according to NIST. The standard further states that authenticators SHOULD require the secrets to be at least six characters in length, according to NIST. Activation secrets MAY be entirely numeric, such as a PIN, according to NIST. This confirms that a numeric code falls within the scope of these character length rules. Keep the local device unlock code separate from an online account password, as these sources address local authentication mechanisms.
Filled reference table of length and retry rules by publisher
The tables below list the unlock code lengths and wrong-try limits stated by four publishers. Each row reflects only the specific rule found on that source's page, so you can verify the setting on your device before handoff.
| Publisher | Code length on the page | Where the rule applies |
|---|---|---|
| Microsoft | The lowest number you can configure for this policy setting is 4. | Windows Hello for Business policy settings Microsoft |
| NIST | at least four characters in length and SHOULD require the secrets to be at least six characters in length | Authenticators using activation secrets NIST |
| Enter 4 or more numbers, but a 6 digit PIN is recommended for added security. | Android screen lock PIN Google |
| Publisher | Wrong-try limit | Where the rule applies |
|---|---|---|
| Apple | 10 consecutive incorrect attempts | iPad, iPhone, or Apple Vision Pro with Erase Data turned on Apple |
| NIST | No more than 10 consecutive failed activation attempts | Authenticators using activation secrets NIST |
For example, the Microsoft source notes the lowest number you can configure is 4, which implies longer codes are possible. For Windows Hello for Business, this lowest number is not the only length a device will accept. The NIST source distinguishes between a mandatory minimum of four characters and a recommendation for six. If you need to manage other access controls later, see MFA requirements for 3 office tools: Entra, GitHub, S3 for related sign-in checks.
What happens after too many wrong tries
Exceeding the allowed number of incorrect entries triggers specific protective mechanisms depending on the device and its configuration. For iPad, iPhone, or Apple Vision Pro devices, if the Erase Data option is turned on in Settings > [Optic ID], [Face ID], or [Touch ID] & Passcode, all content and settings are removed from storage after 10 consecutive incorrect attempts to enter the passcode according to Apple. This erasure action applies specifically when that particular setting is enabled for those product types.
On a Mac at startup, no more than 10 password attempts are allowed at the Login Window to help prevent brute-force attacks, and escalating time delays are imposed after a certain number of incorrect attempts according to Apple. 10 additional attempts are available for the configured FileVault recovery mechanism (iCloud recovery, FileVault recovery key, and institutional key), for a maximum of 30 additional attempts according to Apple.
The speed of these checks also varies by implementation. The iteration count is calibrated so that one attempt takes approximately 80 milliseconds according to Apple. This timing specification helps standardize the computational cost of verifying each entry. Beyond hardware-specific locks, broader security standards recommend preventing weak secrets from being used in the first place. The authenticator or its management tools SHOULD implement a blocklist to discourage subscribers from selecting commonly used activation secrets (such as 123456) according to NIST. This recommendation targets the selection process rather than the retry counter itself.
Confirm the specific recovery method configured for any Mac you manage, since the number of available recovery attempts depends on which mechanism is set up. Check if your organization's authentication tools use a blocklist for common patterns like 123456, as recommended by NIST guidelines.
Code length for the device you are handing over today
The Android page states, "Password: Enter 4 or more letters or numbers," according to Google. This rule applies to the screen lock on an Android device. Do not assume every laptop in the office enforces the strictest number found online. Write down exactly what the device asks for before you hand it to staff.
Rules that apply to a local unlock code, not to an online password
A screen lock secret on the device is separate from any password you use to sign in to an email or cloud account. The rules below describe the local activation secret entered directly on the hardware. When setting this up for a staff member, verify the specific length requirement on the physical device rather than assuming it matches their online credentials.
On Android devices, the screen lock option labeled "Password" requires the user to enter 4 or more letters or numbers, according to Google. This defines the minimum characters needed for that specific lock type.
For increased security, the code length of PIN codes longer than 6 digits aren't visually hinted at on the screen, according to Google. Do not conflate the two when briefing the employee receiving the laptop or phone. For a related desk check, see Password manager rollout: 3 checks before close.
Check the exact character count and digit requirement on the specific model you are configuring today.
Illustrative example of a handoff length check
A person reads a screen that asks for 6 digits. That length sits above a floor of 4. A wrong-try check stops at 10. The handoff note lists the length 6 and the cap 10.
On the phone or laptop in front of you, open the unlock-code setting and read the length it asks for before you hand the device to anyone.
Related guides: Attachment size limits for 4 help desk tools · Change a 2FA method: 3 vendor limits compared · Deal value rules: 8 checks across 4 sales tools.
Device unlock code FAQ
What is the shortest Windows Hello PIN an administrator may set?
The lowest number you can configure for this policy setting is 4, according to Microsoft. This figure represents a configurable minimum within the system settings rather than a fixed length that every device must accept. Administrators should verify their specific configuration against these policy limits before deployment.
What does Android recommend for a PIN?
You should enter 4 or more numbers, but a 6 digit PIN is recommended for added security, according to Google. The guidance distinguishes between the acceptable input range and the specific recommendation for enhanced protection on the device. Staff members setting up new hardware should note this distinction when configuring screen locks.
What does NIST require for a local activation secret?
Authenticators that use activation secrets SHALL require the secrets to be at least four characters in length and SHOULD require the secrets to be at least six characters in length, according to NIST. These requirements define the minimum and recommended standards for local authentication mechanisms. Compliance with these lengths is a core part of the specified security controls.
What does Apple do after 10 wrong passcode tries?
If Erase Data is turned on for iPad, iPhone, or Apple Vision Pro, 10 consecutive incorrect attempts to enter the passcode remove all content and settings from storage, according to Apple.
Does a Mac login window use the same cap?
Yes, the limit applies specifically when the Mac starts up at the Login Window, according to Apple. Escalating time delays follow once the threshold of incorrect attempts is reached. Check the specific model documentation to confirm how these delays manifest on your hardware.