Skip to content
BetterPass logo

Password Policy Generator & Validator — Presets, Breach Checks & Compliance

Define a policy with NIST 2024 / PCI-DSS / HIPAA presets, generate compliant passwords in bulk, validate against your rules and breach lists, and export/import policies as JSON.

Policy Configuration
8
64
0

0 = not enforced. Requires the password to use at least this many distinct characters.

Required Character Types
Restrictions
NIST SP 800-63B alignment:Min length ≥ 8·No mandatory composition·Blocks repeats & sequences·Blocks keyboard patternsBreach list checking
Generated Password
Click "Generate" to create compliant password(s)

What is Password Policy Generator & Validator?

A password policy defines the rules a password must meet before it's accepted. This tool lets you configure custom policies from presets, generate compliant passwords in bulk, and validate existing passwords against your rules and breach lists.

Compliance presets — one click loads NIST 2024 (SP 800-63B), PCI-DSS v4.0, or HIPAA-recommended rules, or start from Custom.
Customizable rules — minimum/maximum length, required character types, pattern restrictions, and a minimum unique-character count.
Breach-list checking — validates against the Have I Been Pwned database using the HIBP range API (k-anonymity): only the first 5 characters of a SHA-1 hash leave your browser.
Compliance summary — a live badge row shows which NIST SP 800-63B rules your current policy aligns with.
Generate & validate — instantly create one or up to 100 compliant passwords, or paste a password to see each rule pass/fail plus a NIST compliance card.
JSON import/export — share policies as JSON matching the schema in the code snippets.

Zero-Server Tool Data Guarantee

All generation and validation happens locally in your browser. The only network request is the optional breach check, which sends just 5 characters of a SHA-1 hash prefix to Have I Been Pwned — the password itself never leaves your device.

How to Use

01

Pick a Preset or Build Custom

Choose NIST 2024, PCI-DSS v4.0, or HIPAA to load recommended rules, or configure each option by hand.

02

Tune the Rules

Set minimum/maximum length, required character types, pattern restrictions, and a minimum unique-character count.

03

Generate One or Many

Set the quantity (1–100) and click Generate. Passwords automatically satisfy every rule.

04

Validate & Check Breaches

Paste a password to see each rule pass/fail plus a NIST compliance card. The HIBP check uses k-anonymity.

05

Share or Reuse the Policy

Export the policy as JSON (download or copy) and import it later, or use the same schema in your own code.

Common Use Cases

Corporate Password Policy

Define and enforce password standards across your organization with a clear, auditable, shareable policy (JSON).

Application Development

Use the exported policy JSON as validation rules in your registration and password change forms.

Compliance Verification

Apply the NIST 2024 / PCI-DSS / HIPAA presets and read the compliance badge to check alignment.

Password Audit

Validate passwords against your policy and the HIBP breach list to identify accounts that need updates.

Batch Onboarding

Generate a batch of up to 100 compliant passwords for team onboarding or automated provisioning.

Implementation Examples

JavaScriptValidate Password Against Policy
function validatePassword(password, policy) {
const errors = [];
if (password.length < policy.minLength)
errors.push(`Min ${policy.minLength} characters`);
if (password.length > policy.maxLength)
errors.push(`Max ${policy.maxLength} characters`);
if (policy.requireLowercase && !/[a-z]/.test(password))
errors.push('Requires lowercase');
if (policy.requireUppercase && !/[A-Z]/.test(password))
errors.push('Requires uppercase');
if (policy.requireDigits && !/[0-9]/.test(password))
errors.push('Requires digit');
if (policy.requireSymbols && !/[^a-zA-Z0-9]/.test(password))
errors.push('Requires symbol');
return errors;
}

NIST Password Policy Requirements & Compliance Standards

StandardMin LengthComplexityRotation
NIST 800-63B (2024)8 charsNo composition rulesOnly after breach
PCI-DSS v4.012 charsNo complexity rulesRisk-based
HIPAANo specificRecommended complexityPeriodic recommended
Common corporate8–12 chars3 of 4 char typesEvery 60–90 days
High-security16+ charsAll char types + patterns blockedAfter breach only

Production Best Practices & Security

Set minimum length to 12+ characters — length is the single most impactful factor in password strength. Why:Each additional character increases the possible combinations exponentially. A 12-character password is 100 million times harder to crack than an 8-character one. PCI-DSS v4.0 mandates 12.
Prefer the NIST 2024 preset for general use — 8+ characters, no composition rules, pattern restrictions, and breach verification. Why:NIST SP 800-63B is the current industry baseline and explicitly drops mandatory complexity in favor of length and breach screening.
Enable breach-list checking — NIST and PCI-DSS v4.0 both require screening against compromised passwords. Why:A password that appears in a public breach is already compromised no matter how strong its composition.
Require a minimum unique-character count for high-security policies — e.g. 8 unique characters. Why:Long passwords made of repeated characters ("aaaaaaaaa9") pass length checks but are trivially guessed.
Enable pattern restrictions — block sequences, repeats, and keyboard patterns to prevent the most common weak passwords. Why:Humans are predictable. Even a long password like "123456789012" or "qwertyqwerty" is extremely easy to guess.
Don't require forced periodic rotation — modern guidance (NIST 800-63B) says to only rotate after a breach, not on a schedule. Why:Forced rotation pushes users toward weak, predictable variations ("Password1!", "Password2!") that reduce security.
Share policies as JSON — export your final policy and reuse it across teams or in your own validation code. Why:A policy enforced differently in different systems drifts; a canonical JSON document keeps everyone aligned.

Frequently Asked Questions

The NIST 2024 preset applies the current baseline: a minimum of 8 characters, no mandatory composition rules (no required uppercase, digits, or symbols), blocking of repetitive/sequential characters and keyboard patterns, and breach-list verification against the Have I Been Pwned database.

The live compliance badge shows which NIST rules your current policy aligns with, and validation includes a dedicated NIST SP 800-63B Compliance card showing each rule pass/fail. NIST also drops periodic rotation — only rotate after a breach.

For stricter environments, the PCI-DSS v4.0 preset raises the minimum to 12 characters, and the HIPAA preset applies recommended complexity (HIPAA itself specifies no fixed rules).