CalcHub

Password Generator

This generates passwords using your browser's cryptographic random source, entirely on your device. Nothing is sent anywhere, no password is logged, and the page continues working with the network disconnected — which you can verify by turning off your connection and generating another one. That property matters more than it might seem: a password generator that runs on a server has, by construction, seen every password it produced. Choose a length and a character set, and the tool draws each character independently from your selected alphabet using cryptographically strong randomness rather than the predictable pseudo-random generator most scripts reach for. The sections below explain how password strength is actually measured, why length beats complexity, and where a generated password belongs once you have one.

How this is calculated

Each character is drawn independently and uniformly from your selected alphabet using crypto.getRandomValues, with rejection sampling to avoid the modulo bias that would otherwise make some characters marginally more likely than others.

Strength is measured in bits of entropy: log₂(alphabet size) × length. A 16-character password from the 94 printable ASCII characters carries about 105 bits. A 16-character lowercase-only password carries about 75 bits — still substantial, but a trillion times weaker.

Each additional bit doubles the search space. That is why the comparison between password schemes is best made in bits rather than in vague labels like 'strong', which convey nothing about the actual margin.

Length beats complexity

Adding one character to a password multiplies the search space by the size of the alphabet — for mixed-case letters and digits, by 62. Adding symbols to a fixed-length password multiplies it by a much smaller factor, because it only widens the alphabet from 62 to 94.

A 20-character password using only lowercase letters carries about 94 bits, comfortably more than a 12-character password using every symbol on the keyboard, which carries about 79. Length is the more efficient lever, and it produces passwords that are easier to type when you have to.

This is why the old advice about substituting characters — replacing letters with lookalike symbols — is largely useless. Those substitutions are well known to cracking tools, add almost no entropy, and make the password considerably harder to type.

Where a generated password should live

In a password manager. A genuinely random 16-character password is not memorable, and any scheme that makes it memorable removes most of the randomness that made it strong.

Reuse is the failure mode that actually matters. Credential stuffing takes passwords exposed in one breach and tries them elsewhere, and it works because reuse is common — not because any individual password was weak. A unique generated password per site makes a breach at one service irrelevant to every other.

Two-factor authentication remains worth enabling regardless of password strength, because it defends against the cases a strong password cannot: phishing, a compromised device, and a breach at the service itself.

How to use the password generator

  1. Choose a length. 16 characters or more for anything that matters. Length raises entropy faster than adding symbols does.
  2. Select the character sets. Include symbols unless the site rejects them. Some services still impose limits that force a narrower alphabet.
  3. Store it in a password manager. Do not try to remember it. A unique password per site is what actually defends against credential stuffing.

Last updated: 2026-08-01

Frequently asked questions

How long should a password be?

16+ random characters for anything important. Length beats complexity: a 20-character random password is astronomically harder to crack than an 8-character one with symbols.

Is it safe to generate passwords online?

Here, yes: generation uses crypto.getRandomValues locally in your browser. Nothing is sent to any server — you can disconnect from the internet and it still works.

Is a longer password better than a more complex one?

Yes, and by a wide margin. A 20-character lowercase password carries about 94 bits of entropy; a 12-character password using every symbol carries about 79. Each extra character multiplies the search space by the alphabet size, which beats widening the alphabet.

What are bits of entropy?

A measure of how many guesses an attacker would need. It is log₂(alphabet size) × length, and each additional bit doubles the search space. A 16-character password from the full printable ASCII set is about 105 bits. It is a far more useful measure than labels like 'strong'.

Should I reuse a strong password across sites?

No. Credential stuffing takes passwords exposed in one breach and tries them everywhere else, and it succeeds because of reuse rather than weakness. A unique generated password per site means a breach at one service tells an attacker nothing about the others.

Related calculators

Advertisement