Password Generator

A password is ready as soon as the page opens. Set the length and the character types, copy it with one click and generate another whenever you like.

••••••••••••••••

How the password is generated

Each character is drawn with crypto.getRandomValues, the browser's random generator built for cryptography. Math.random is not used, because its output can be predicted. The code discards values that would make some characters more likely than others.

When you select several character types, the password always contains at least one of each. It is only drawn after the page opens in your browser, so nobody is served a ready-made password from earlier.

What makes a password strong

Strength comes from length and randomness. Entropy, in bits, is the length times log2 of the number of possible characters. Each extra bit doubles the number of guesses an attacker needs.

  • Length matters more than variety. Going from 12 to 16 characters helps more than swapping a letter for a symbol.
  • More character types enlarge the set the password is drawn from. If the site accepts them, use all four.
  • No look-alike characters removes 0, O, o, 1, l, I and

Storing passwords in your system

To store a user's password, never save the plain text. Hash it with the bcrypt generator, which is slow on purpose and resists brute-force attacks.

Password Generator FAQ

Strength, characters and how to use the generated passwords.