Zero Signup ToolsFree browser tools

Security Tools

Password Policy Generator

Build a password policy in your browser. Pick rules, get a plain-English document, a regex, an HTML pattern, sample compliant passwords, and a batch tester.

Minimum 12, mixed character classes, block-list.

Length

Character classes

Symbol set

The full ASCII printable symbol set recommended by OWASP. Includes the space character.

Blocked patterns

Three characters or more. Matched case-insensitively. Leave blank to skip this rule.

Policy description

Passwords must be between 12 and 128 characters long. Passwords must include a lowercase letter (a-z), an uppercase letter (A-Z), and a digit (0-9). Passwords must not match a known common or leaked password (case-insensitive, leet variants included).

Regex

JavaScript regex literal

/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{12,128}$/

HTML pattern attribute

(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{12,128}
  • The 'block common passwords' rule cannot be expressed compactly as a regex. The tester enforces it in JavaScript. Mirror that check on the server.

HTML snippet

<input
  type="password"
  name="password"
  autocomplete="new-password"
  minlength="12"
  maxlength="128"
  pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{12,128}"
  title="Passwords must be 12-128 characters long"
  required
/>

Sample compliant passwords

Generated with crypto.getRandomValues. Use, share, or rotate.

  • ExXLaQd9bgmSw2UM
  • fsfF9mqk35awA6p7
  • 8Vib7mCEC7RSn2D9
  • E6f5jeTa7sD6vr2Z
  • fx9ZQiSCBxc3C9DG

Test passwords

Type a candidate password to see which rules pass and which fail. Nothing is sent anywhere.

How to use

  1. Pick a preset to start (NIST 800-63B, OWASP ASVS, Active Directory, PCI DSS, HIPAA, or strong consumer default) or choose Blank and toggle each rule from scratch.
  2. Tune the length range, the required character classes, the per-class minimum counts, the symbol set, and the blocked-pattern rules (whitespace, common passwords, user-context substring, straight sequences, repeated characters).
  3. Copy the plain-English policy text, the JavaScript regex literal, or the HTML pattern attribute. The HTML snippet section gives you a ready-to-paste <input> with pattern, minlength, maxlength, title, and autocomplete pre-filled.
  4. Click Generate to produce sample compliant passwords with crypto.getRandomValues. Use them as test fixtures or share them with QA. The Count input controls how many you get.
  5. Switch to Test passwords to validate a single candidate or paste a batch list. Each row shows Pass or Fail and the exact rule that failed, with a Copy report button for the tab-separated result.

About this tool

Password Policy Generator turns the choices a security or product team usually argues about (minimum length, character classes, block lists, sequences, repeats) into the four artifacts that actually ship: a plain-English policy document you can paste into a wiki or compliance binder, a regular expression you can drop into client-side or server-side validation, an HTML input snippet with the pattern, minlength, maxlength, autocomplete, and title attributes pre-filled, and a list of sample compliant passwords generated with crypto.getRandomValues so a tester or QA can copy a real password that proves the policy works. Every rule is configurable: minimum length, maximum length, required lowercase letters, required uppercase letters, required digits, required symbols (with a configurable symbol set, including the OWASP recommended set, an Active Directory complex set, a short URL-safe set, and an alphanumeric-only mode), per-class minimum counts, a whitespace ban, a common and leaked password block list (with case-insensitive matching and a small leet-speak normalization pass), a user-context substring ban (handy when the rule is the password must not contain the username or email local part), a straight-sequence ban with configurable length that catches qwerty, 12345, and abcdef, and a repeat-character ban with a configurable limit. The Test passwords panel runs the rules against a single candidate or a batch list of one-per-line candidates and shows a Pass or Fail badge plus the exact rule that failed for every row, so a security review or a help-desk triage can answer why does my password not work without guessing. Presets cover the common starting points: NIST 800-63B (the modern minimum 8, no composition, block-list common passwords recommendation), NIST 800-63B Strict (minimum 12), OWASP ASVS Level 1 and Level 2, the Active Directory default complex policy, PCI DSS 4.0, a HIPAA-aligned profile, a strong consumer default, and a blank starting point. The regex output emits a JavaScript literal with delimiters and flags and the partially-anchored HTML pattern attribute form the input element expects, and notes flag the rules that cannot be expressed in a single short regex (block list, straight sequences) so the team knows to mirror those checks on the server. Useful for sign-up forms, compliance documents, onboarding wikis, security policy generators, AD GPOs, identity providers, password manager corporate policies, and any place where the password rule needs to be written once and applied everywhere. Everything runs locally. The policy, the candidate passwords, the user-context word, and the sample compliant passwords stay in component state and are never uploaded.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsSecurity Tools