Password security guide

How Password Generators Work

A secure generator starts with a cryptographically secure random source, maps it without bias, exposes the policy and keeps the result away from unnecessary systems.

The generator pipeline

Each stage matters. A large character set does not help if the random source is predictable, and a secure random source can still be weakened by biased mapping or accidental transmission.

Cryptographic randomness versus Math.random()

Browser Web Crypto obtains randomness intended for cryptographic use from the operating environment. Math.random() is designed for simulations and ordinary randomized behavior, not secret generation. Its internal state or output may be predictable.

This site refuses to fall back to Math.random(). If Web Crypto is unavailable, the tool should fail visibly rather than generate a weaker secret.

Why modulo mapping can be biased

Random bytes have 256 possible values. If 256 is not evenly divisible by the pool size, directly applying the remainder operator makes some characters slightly more likely. Rejection sampling discards byte values above the largest evenly divisible range, then maps the rest.

The effect may be small per character, but avoiding it is simple and produces a clear uniform model.

Character pools and service policies

The pool is assembled from selected lower-case letters, upper-case letters, digits, symbols and optional custom symbols. Excluding ambiguous characters reduces the pool but can improve manual usability. The interface must show which assumptions affect the result.

Service rules take priority. A generator should not silently remove rejected characters and claim the original estimate still applies.

Requiring every selected group

A naive generator may force one symbol at the end or one digit at the beginning, creating positional patterns. This implementation generates a complete candidate and rejects it if a required group is missing. The result remains random among strings that satisfy the selected policy.

The constrained combination count is lower than the unconstrained pool formula and should be calculated accordingly.

Why local execution helps privacy

A client-side generator does not need to send a secret to a server. This site goes further by placing the tool on a separate origin without analytics, ads, remote libraries or storage. The content page cannot inspect the frame under the browser same-origin policy.

Local execution does not protect a compromised browser, extension or operating system. Deployment integrity and HTTPS still matter.

How to evaluate another password generator

  • Look for a cryptographic random source and no weak fallback.
  • Confirm values are not placed in URLs, logs or analytics.
  • Check whether third-party scripts can access the result.
  • Verify the pool and requirement behavior are documented.
  • Prefer open, testable logic over unverifiable “military-grade” claims.
  • Test failure behavior when required browser APIs are missing.

Generation is not the complete security system

The result still needs unique use, safe storage, MFA, recovery planning and a trustworthy service. Server operators need rate limiting, breach screening and modern salted password hashing. A generator creates an input; it cannot enforce how another system stores or verifies it.

Testing a generator implementation

Static review should confirm the random API, absence of weak fallback, unbiased mapping, pool construction and constraint algorithm. Automated tests should force edge values around rejection boundaries, validate required groups, check output length and pool membership, and ensure failure is visible when Web Crypto is unavailable.

Statistical tests can reveal gross defects but cannot prove cryptographic security. Source review and platform guarantees remain necessary.

Operational integrity after development

A correct local file can be altered during deployment, compromised through a server account or framed by the wrong origin if headers are misconfigured. Verify production hashes or release artifacts, HTTPS, CSP, cache behavior and browser console output after deployment. Keep third-party code out of the secure origin so its review boundary stays small.

Sources and further reading

Use the documented local generatorCreate a random password with visible pool and length assumptions.Open the tool →
Written and reviewed by Gabor Kohanyi

Technical claims are checked against the cited primary standards and official service documentation. Corrections are handled under the editorial policy.