Skip to content
ToolkitHub

Password Generator

Generate secure passwords

Guide

What makes a generated password secure

By Logappradeep · ServiceNow developer

The strongest password is one that nobody, including you, chose. People pick words, dates and keyboard patterns that attackers try first. A random password generator removes that bias by drawing every character from a cryptographically secure random source, so the only way to guess the result is to try every possibility.

Measuring strength with entropy

A random password's strength is measured in bits of entropy: length × log2(character set size). Each bit doubles the number of guesses an attacker needs. This generator offers four character sets:

  • Uppercase letters A to Z (26 characters)
  • Lowercase letters a to z (26)
  • Digits 0 to 9 (10)
  • Symbols such as ! @ # $ % ^ & * and brackets (26)

With all four enabled there are 88 possible characters, worth about 6.46 bits each. A 16-character password therefore has roughly 103 bits of entropy, far beyond what any brute-force attack can cover. Digits alone at the same length give only about 53 bits. Length is the cheapest way to add strength: going from 12 to 16 characters adds around 26 bits, which multiplies the search space by tens of millions.

Why the random source matters

JavaScript's Math.random() is fast but not designed for security; its output can be predictable. This tool uses crypto.getRandomValues(), the browser's cryptographically secure random number generator, which draws on the operating system's entropy source. The password is generated on your device and is not sent anywhere or saved by the tool.

Choosing settings

  • For accounts stored in a password manager, use 16 to 24 characters with all sets enabled; you never have to type them.
  • For Wi-Fi keys or passwords you will type on a TV or console, consider a longer password with fewer symbols, which is easier to enter and can be just as strong.
  • For API secrets and service accounts, 32 or more characters is common and costs nothing.

Pitfalls

Some sites reject certain symbols or cap the length. If a site refuses a password, turn off symbols and increase the length to compensate rather than accepting a short password. Each character is chosen independently, so a short password may not contain every type you enabled; if a site demands at least one digit and one symbol, check the result and regenerate if needed.

A strong password still fails if it is reused. When one site is breached, attackers try the same email and password everywhere else, a technique called credential stuffing. Generate a unique password for every account, store them in a password manager, and turn on two-factor authentication where it is offered.

Finally, copying a password to the clipboard makes it available to other apps until it is overwritten, so paste it where it belongs promptly.

Frequently asked questions

How long should my password be?

For accounts in a password manager, 16 or more random characters with all character sets is a solid default. Longer is always stronger.

Is a password generated in the browser safe?

Yes, when it uses a cryptographically secure source. This tool uses crypto.getRandomValues, and the password never leaves your device.

Why doesn't my password contain a symbol even though symbols are enabled?

Each character is picked independently at random, so short passwords can miss a type by chance. Regenerate or increase the length if a site requires every type.

Should I memorize generated passwords?

Generally no. Store them in a password manager and memorize only the manager's master password, ideally a long passphrase.