◇ Security & Cryptography

Password, Passphrase & API Key Generator

Generate strong passwords, EFF-wordlist passphrases and developer secrets (hex, Base64URL, UUID v4, prefixed API keys) with crypto.getRandomValues and exact entropy.

crypto.getRandomValues EFF passphrases API keys & secrets Exact entropy

Loading Password Generator…

What this page sends

  • Your input: Passwords are generated in this tab with crypto.getRandomValues and never saved. The passphrase wordlist is fetched from ByteKiln when you first switch to passphrases. Only your option choices are kept in local storage.
  • Page load: Loading the page requests HTML, scripts and images from ByteKiln, fonts from Google Fonts, and sends Google Analytics page views, tool-usage events and catalog interactions (tool/category IDs, result status and whether a click followed search — never your input, output or search terms). Privacy & sharing

How the Password, Passphrase & API Key Generator Works

Most password generators are fine; the details are where they differ. This one generates three kinds of secret. Passwords from 8 to 128 characters with any mix of lowercase, uppercase, digits and symbols, a custom symbol set for systems that only allow some, an option to drop look-alike characters, and an optional guarantee of at least one character from each set. Passphrases from the EFF Large Wordlist, with your choice of word count, separator, capitalization and an extra digit. And developer secrets: hex and Base64URL values of 16, 32 or 64 bytes, UUID v4, and prefixed API keys like sk_test_…. Everything comes from crypto.getRandomValues with rejection sampling, so there is no modulo bias, and "at least one of each" characters are shuffled into random positions with an unbiased Fisher–Yates shuffle. The entropy shown is computed for your exact settings, including the effect of required sets. Generate up to 100 at once and copy or download them. Generated values are never stored or shared.

Randomness

Random 32-bit values come from crypto.getRandomValues. To pick one of n options, values at or above the largest multiple of n below 2^32 are discarded and redrawn, so every option has exactly the same probability. The same routine drives the shuffle and the word choice.

Entropy

Without required sets, entropy is length × log2(alphabet size). With "at least one of each", the number of possible passwords is counted exactly with inclusion–exclusion (all strings minus those missing a set), and entropy is log2 of that count. Passphrase entropy is words × log2(7,776), plus the digit and its position if added.

Passphrase wordlist

The EFF Large Wordlist has 7,776 words chosen to be memorable and distinct, designed for five dice rolls per word. It is bundled with the page (credited to the Electronic Frontier Foundation, CC BY 3.0 US) and loaded only when you switch to passphrases.

Secrets

Hex and Base64URL encode raw random bytes (Base64URL without padding is safe in URLs, headers and environment variables). UUID v4 sets the version and variant bits on 16 random bytes, leaving 122 random bits. API keys use a Base62 body after your prefix.

Limitations

  • Entropy assumes the attacker knows your settings, which is the right assumption, but it measures the generator — not a password you edit afterwards.
  • It generates; it doesn't store. There is no vault, history or sync, so copy the result where you need it.
  • Site-specific rules ("must start with a letter", maximum length) are only met through the options you choose.

FAQ

Short answers for the things developers usually ask before trusting a tool.

Are generated passwords sent or saved anywhere?

No. They are generated in your browser with crypto.getRandomValues and never stored, sent, or put in a link. Only your option choices (length, sets) are remembered on this device.

How random are they?

Every character or word is chosen with the Web Crypto API's cryptographically secure random generator, using rejection sampling so each option is exactly equally likely — the common "random byte % 62" shortcut makes some characters more likely than others. Math.random is never used. The test suite checks the distribution with a chi-square test over 100,000 characters per set.

How many bits of entropy do I need?

For a password protected by a slow hash (bcrypt, Argon2) and rate-limited logins, 60+ bits is solid. For something that could be attacked offline with a fast hash, aim for 80+. Machine secrets like API keys and JWT signing keys should be 128–256 bits — a 32-byte random value.

Are passphrases secure?

Yes, when the words are chosen randomly. Each word from the 7,776-word EFF list adds 12.9 bits, so six words give 77.5 bits — about the same as a random 12-character password using all four character sets, and much easier to type and remember. What makes them weak is choosing the words yourself.

Does "at least one of each" make passwords weaker?

Slightly — it removes the combinations that miss a set — and the entropy shown accounts for that exactly. The required characters are shuffled into random positions, so they don't always appear at the start as with some generators.

What format should an API key have?

Use at least 128 bits of randomness and a recognizable prefix like sk_live_ — the prefix lets secret scanners (GitHub, GitGuardian) detect leaked keys and tells humans what the key is for. Store only a hash of the key on the server, like a password.

Related tools

Useful follow-ups when one conversion usually turns into three more.