This guide shows you how to enforce a minimum and maximum PIN length for Windows 10 sign-in. This is useful for organizations or users who want to strengthen security by preventing short or overly long PINs. You’ll need to edit the Local Group Policy Editor or the Registry Editor, both built into Windows 10 Pro and Enterprise editions.
What You’ll Need
- Windows 10 Pro, Enterprise, or Education edition (the Home edition lacks Group Policy Editor).
- Administrator account access to change system settings.
- Familiarity with backing up the registry (optional but recommended).
Step-by-Step
- Open the Local Group Policy Editor. Press Win + R to open the Run dialog, type
gpedit.msc, and press Enter. If you get an error saying the file is not found, your edition doesn’t support Group Policy; use the Registry method below. - Navigate to PIN complexity settings. In the left pane, go to
Computer Configuration→Administrative Templates→System→PIN Complexity. - Open the minimum PIN length policy. Double-click
Minimum PIN lengthin the right pane. - Enable and set the minimum. Select
Enabled, then in theMinimum PIN lengthbox, type a number between 4 and 127 (default is 4). ClickOK. - Set the maximum PIN length. Double-click
Maximum PIN length, selectEnabled, and enter a number between 4 and 127. Ensure it’s greater than or equal to the minimum. ClickOK. - Apply and exit. Close the Group Policy Editor. The new settings take effect immediately for new PINs; existing PINs may need to be changed to comply.
Alternative: Using Registry Editor (if Group Policy is unavailable):
- Open Registry Editor. Press Win + R, type
regedit, and press Enter. ClickYesif prompted by UAC. - Navigate to the PIN complexity key. Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity. If thePINComplexityfolder doesn’t exist, right-clickPassportForWork, selectNew→Key, and name itPINComplexity. - Create the minimum PIN length value. Right-click in the right pane, select
New→DWORD (32-bit) Value, name itMinimumPINLength, and set its value data to the desired minimum (e.g.,6). Use decimal base. - Create the maximum PIN length value. Repeat the same to create
MaximumPINLengthand set its value data to the desired maximum (e.g.,10). - Restart or sign out. Close Registry Editor and restart your PC or sign out and back in for the changes to apply.
Common Mistakes
- Setting max lower than min: Windows will reject this or cause unpredictable behavior. Always set max ≥ min.
- Using the Home edition with gpedit: The Group Policy Editor is not available on Windows 10 Home. Use the registry method instead.
- Forgetting to enable the policy: If you set a value but leave the policy as “Not Configured,” it won’t apply. You must select
Enabled. - Not restarting after registry changes: Some registry changes require a sign-out or reboot to take effect.
- Typing values in hex by mistake: In Registry Editor, ensure the base is set to Decimal when entering numbers like 10, otherwise you might get 16.
Tips
- If you want to enforce complexity (like requiring letters and numbers), also enable the
Require digitsandRequire lowercase letterspolicies in the same PIN Complexity folder. - Test the new limits by trying to change your PIN via
Settings→Accounts→Sign-in options→Windows Hello PIN→Change. It should reject PINs outside your set range. - Keep the maximum reasonable (e.g., 10-12). Extremely long PINs become hard to remember and slow down sign-in.
- Remember that these settings only affect new PINs. Existing PINs that don’t meet the new criteria will still work until the user changes them.
Troubleshooting
- “gpedit.msc not found” error: This confirms you’re on Windows 10 Home. Use the registry method (steps 7-11) instead.
- Changes don’t take effect: Double-check that you’ve enabled the policy (not just set a value) in Group Policy. For registry, ensure the key path is correct and you’ve restarted.
- Can’t set a value below 4: Windows enforces a minimum PIN length of 4 for security. You cannot set it lower than 4.
- PIN change fails with an error: If the current PIN doesn’t meet the new length, you may need to sign in with a password and then change the PIN. Sometimes you need to remove the PIN entirely and re-add it.
- Policy applied but still allows short PINs: Make sure you’re not also using a Microsoft account with a separate PIN policy. Local accounts and Microsoft accounts may have different settings. Also, check if any third-party security software overrides these policies.
Frequently Asked Questions
Can I set a minimum PIN length on Windows 10 Home?
Yes, but only via the Registry Editor method. The Group Policy Editor is not available on Home edition.
What is the default minimum PIN length?
The default is 4 characters. The default maximum is 127, but most users never hit that.
Will this affect my Microsoft account PIN?
Yes, if you’re signed in with a Microsoft account and using Windows Hello PIN, the policy applies to that PIN as well.
Do I need to restart after changing Group Policy?
Usually not. Group Policy changes apply immediately, but if the PIN settings don’t seem to update, a sign-out or restart helps.
Can I set different lengths for different users?
No, these policies are machine-wide. You’d need to use more advanced tools like PowerShell or security templates to achieve per-user differences.
What happens if an existing PIN doesn’t meet the new minimum?
The user will still be able to sign in with that PIN, but they’ll be prompted to change it next time they access PIN settings. They may also be forced to change it if you enable the “Expiration” policy.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Messenger Calls Not Ringing: Fixes for Android & iPhone
- NordVPN Not Working on Windows 11? Fixes That Work
- Firestick vs Fire TV: Key Differences
- Kodi Crashing on Windows? Fixes That Work
- Extract SMS & iMessage from iTunes Backup
- View Saved Passwords on Samsung Galaxy Phones