Password generator

This generates a password using PHP. It randomizes a string of letters, numbers and special characters.

w7PBD{!-4uI9

How to generate a password

  1. A new 12-character password is ready when the page opens.
  2. To change the length, enter a number from 4 to 60 in Length.
  3. Press Generate for a new password, as often as you like.
  4. Press Copy output and paste the password into your password manager or the sign-up form.

What goes into each password

  • Lower-case letters a–z
  • Upper-case letters A–Z
  • Digits 0–9
  • Symbols !@#$%^&*()_+-=[]{}|;:,.<>?

Every password contains at least one character from each of the four groups, which satisfies most "must contain" rules. The other characters are picked from all 88 at random, using PHP's cryptographically secure random_int(), and the order is then shuffled.

How long should it be?

Length matters more than anything else. Each extra character from an 88-character set multiplies the number of possible passwords by 88. As a guide:

  • 12 characters: fine for most accounts when combined with a password manager.
  • 16 to 20 characters: a good choice for email, banking and anything that would let someone reset your other passwords.
  • Up to 60: for Wi-Fi keys, API secrets and other places where you never type it by hand.

Limits

  • Lengths below 4 are raised to 4 and lengths above 60 are cut to 60.
  • Symbols can't be switched off. If a site rejects a symbol, generate again or replace that character.
  • The password is created on the server and shown to you; it isn't saved. Only your chosen length is remembered for your visit.

FAQ

Should I reuse a generated password? No. Use a different one for every site, and keep them in a password manager.

How do I store a password in my own app? Never store it as plain text. Hash it, as the password hash tool shows.