Skip to main content

Password Generator

Generate strong random passwords, API keys and secret tokens with custom length and character sets, plus an entropy score. Created locally in your browser.

More options

Estimated entropy: ~129 bits

Generated value

Choose your options, then press Generate.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Free Online Password & Key Generator

Generate a secure, random password, API key, or secret token with full control over length and character types — generated locally using your browser's cryptographically secure random number generator, never sent anywhere. It helps developers create unique credentials, API keys, and test secrets instead of reusing predictable passwords.

How to generate a secure password or key

Set the length using the slider (8 to 128 characters), choose which character types to include, and click Generate. Every character is chosen using crypto.getRandomValues(), the browser's cryptographically secure random number source — the same underlying API used for security-critical operations, not the predictable Math.random() function.

Passwords vs. API keys vs. secret tokens

A user-facing password needs to balance strength with the practical reality that a person might need to type it — 16-20 characters with a mix of character types is a solid default. An API key or secret token used only by a program has no such constraint, so longer is generally better: 32-64 characters gives a comfortable security margin for something that will never be memorized or typed by hand.

Passphrases

Choose Passphrase (words) to get a few random ordinary words, such as cabbage-lair-frugal-snap-upload, which are easier to remember and type than random characters. Words come from the EFF large word list of 7,776 words, so every word adds about 12.9 bits: 5 words is about 64.6 bits and 6 words about 77.5 bits. You can capitalise the words, add a number or a symbol, pick the separator, and make up to 500 at once under "More options".

Understanding entropy

Entropy, measured in bits, describes how many possible values a generated password could take — each additional bit doubles the number of possibilities an attacker would need to try. Both the character pool size (which types are enabled) and the length contribute to entropy: turning off a character type reduces the pool, so consider increasing the length to compensate if a particular service restricts which characters you can use.

Worked example

With all four character types enabled (a pool of 88 characters: 26 uppercase, 26 lowercase, 10 digits, 26 symbols) and length set to 20, the entropy reads ~129 bits. Turn off Symbols with the same length 20 and it drops to ~119 bits — losing one character type costs less than you might expect at this length, since the pool only shrinks from 88 to 62, but at shorter lengths the same change matters proportionally more.

Common mistakes and edge cases

  • Turning off every character type leaves nothing to generate from — the tool reports "Select at least one character type" rather than producing an empty or predictable result.
  • Leaving out characters can empty a whole type. If you leave out every symbol while "Symbols" is on, the tool tells you to turn "Symbols" off or allow some, instead of quietly ignoring it.
  • In a passphrase, leaving out look-alikes or custom characters also removes every word that contains them, so the word list gets smaller and each word adds a little less than 12.9 bits. The entropy shown is recalculated for the smaller list.
  • A generated value is never saved, logged, or stored anywhere by this tool — closing the tab or generating a new one means the previous value is gone for good if you didn't copy it.

Frequently asked questions

Are the passwords generated here actually secure?
Yes — generation uses crypto.getRandomValues, the same cryptographically secure random number source browsers use for security-critical operations, not Math.random(). Nothing is sent to a server, and nothing generated is logged or stored anywhere.
What length should I use for a password vs. an API key?
For a user-facing password, 16-20 characters with all character types enabled is a reasonable strong default. For an API key or secret token that a program will store and use (never typed by a human), 32-64 characters is common practice, since length matters more than memorability there.
What does the entropy (bits) number mean?
It's a measure of how many possible values the password could be, expressed as a power of 2 — higher is better. As a rough guide, 60+ bits is reasonable for most personal use, and 80+ bits is common practice for high-value accounts or secrets.
Should I avoid symbols if a website doesn't accept them?
Yes — turn off the Symbols toggle if a service rejects special characters. Removing a character type reduces the entropy for a given length somewhat, so consider increasing the length to compensate.
How strong is a passphrase compared with a random password?
Each word is picked at random from the 7,776-word EFF list, so 5 words is about 64.6 bits and 6 words about 77.5 bits, roughly as strong as a 10 to 12 character fully random password but much easier to remember. The words are chosen independently, so do not rearrange them or swap them for words you like better.
Can I generate many passwords or passphrases at once?
Yes. Open "More options", set "How many" (1 to 500) and press Generate. You get one per line, and each one is generated independently.
Is the character selection perfectly unbiased?
Yes. Every character comes from crypto.getRandomValues() using rejection sampling: random numbers that would favour some characters over others are thrown away and drawn again, so each allowed character is equally likely.
How long should a generated password be?
Use at least 14 characters for ordinary accounts and 20 or more for important ones such as email and banking. A long random password with letters and digits is stronger than a short one full of symbols, and it must be different for every site. Store it in a password manager so you do not have to remember it.

Related tools

More Security & Auth

View all Security & Auth tools →