sodcalculator

10 Tech How-To

Set Min & Max PIN Length in Windows 10

Guide 10-31921 · Updated · Step by step

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

  1. 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.
  2. Navigate to PIN complexity settings. In the left pane, go to Computer Configuration → Administrative Templates → System → PIN Complexity.
  3. Open the minimum PIN length policy. Double-click Minimum PIN length in the right pane.
  4. Enable and set the minimum. Select Enabled, then in the Minimum PIN length box, type a number between 4 and 127 (default is 4). Click OK.
  5. Set the maximum PIN length. Double-click Maximum PIN length, select Enabled, and enter a number between 4 and 127. Ensure it’s greater than or equal to the minimum. Click OK.
  6. 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):

  1. Open Registry Editor. Press Win + R, type regedit, and press Enter. Click Yes if prompted by UAC.
  2. Navigate to the PIN complexity key. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PassportForWork\PINComplexity. If the PINComplexity folder doesn’t exist, right-click PassportForWork, select New → Key, and name it PINComplexity.
  3. Create the minimum PIN length value. Right-click in the right pane, select New → DWORD (32-bit) Value, name it MinimumPINLength, and set its value data to the desired minimum (e.g., 6). Use decimal base.
  4. Create the maximum PIN length value. Repeat the same to create MaximumPINLength and set its value data to the desired maximum (e.g., 10).
  5. 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 digits and Require lowercase letters policies 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

The whole Tech How-To bed →