# Password, Passphrase and PIN Generator

> Make random passwords, word passphrases, pronounceable strings or numeric PINs, in batches of up to 50, each with its entropy in bits.

Use it online (free, runs in your browser): https://directory.milunir.com/developer-tools/passwords-and-hashes/password-passphrase-and-pin-generator/

Pick a mode and the page draws a fresh secret from your browser's cryptographic random source. A 20-character password using lowercase, uppercase, digits and symbols scores 128.5 bits; seven words from the 256-word list score 56 bits; a 4-digit PIN has only 10,000 combinations, or 13.3 bits.

Different logins need different kinds of secret. A vault entry in a password manager can be 20 random characters nobody types; a laptop sign-in you enter every morning is easier as a string of words; a bank card or phone lock wants digits only. This page covers all four: character passwords, word passphrases in the XKCD and Diceware style, consonant-vowel strings you can read aloud, and PINs. Each result shows its entropy in bits and a plain strength label, and More options lets you make a batch of up to 50 and skip look-alike characters. The passphrase list has 256 words, so each word adds exactly 8 bits, fewer than the 12.9 bits of the 7,776-word Diceware list; use more words to make up the gap.

## How to use

1. **Choose a mode**: Password, Passphrase, Pronounceable or PIN at the top of the widget.
2. **Set length and character types**: Move the length slider or the word and digit counters, and switch uppercase, digits or symbols on or off.
3. **Check the bits**: The entropy and strength line updates as you change settings; aim for 75 bits or more for an account password.
4. **Copy one**: Copy the headline secret, or use More options for a batch and copy any row from the table.

## Examples

### Strong 20-character password

- Mode: Password
- Length: 20
- Uppercase (A–Z): Yes
- Digits (0–9): Yes
- Symbols (!@#…): Yes
- How many: 5

Result: Your new secret: KNlfnIH$Av0Q5.Q/9q/y Entropy (bits): 128.5 Strength: Very strong

With all four character types the pool holds 86 characters, so each one adds about 6.4 bits; 20 of them reach 128.5 bits.

### Seven random words

- Mode: Passphrase
- Words: 7
- Between words: Hyphen -
- Capitalize each word: No
- How many: 3

Result: Your new secret: marble-away-fox-bead-nest-gift-glove Entropy (bits): 56 Strength: Fair

Each word comes from a 256-word list, worth exactly 8 bits, so seven words give 56 bits and stay easy to type.

### Ten letters you can say aloud

- Mode: Pronounceable
- Letters: 10
- How many: 1

Result: Your new secret: vefaficuno Entropy (bits): 32 Strength: Weak

Alternating consonants and vowels makes the string easy to read out, but ten letters reach only 32 bits.

### Four-digit PIN

- Mode: PIN
- Digits: 4
- How many: 1

Result: Your new secret: 6726 Entropy (bits): 13.3 Strength: Weak

Only 10,000 combinations exist, about 13.3 bits, which is why cards and phones lock after a few wrong tries.

## How it works

`entropy (bits) = number of choices × log₂(options per choice)`

- `choices`: characters, words or digits drawn
- `options per choice`: 86 for all four character types, 62 for letters and digits, 256 words, 10 digits

Every character, word or digit is drawn with crypto.getRandomValues. In Password mode the tool first takes one character from each type you switched on, so sign-up rules are met, then fills and shuffles. Pronounceable mode alternates 17 consonants and the 5 vowels, starting with a consonant, so its bits are the sum of both parts. Strength labels: under 50 bits Weak, 50 to 75 Fair, 75 to 100 Strong, 100 and up Very strong. The bits assume an attacker knows the mode and the length but not the random draws.

Sources:

- [SP 800-63B Digital Identity Guidelines: Authentication](https://pages.nist.gov/800-63-3/sp800-63b.html), National Institute of Standards and Technology

## When not to use it

- A site that caps passwords at 8 or 10 characters will cut a long result; set the slider to its limit instead.
- A pronounceable string is weaker per letter than a random one, so it needs to be much longer for the same bits.

## Common mistakes

- Picking your own favorite words for a passphrase, which removes the randomness the bit count assumes.
- Treating a 4-digit PIN as a password; it only holds up where the device locks after a few wrong tries.
- Reusing one generated secret on several accounts.

## Questions

### What is an example of an alphanumeric password?

An alphanumeric password uses only letters and digits, such as k7Rm2QxP9wTa. Switch Symbols off in Password mode to get one. With 62 possible characters, 12 of them give about 71.5 bits, and 16 give about 95 bits.

### How strong is a 12-character password from the generator?

With lowercase, uppercase, digits and symbols, 12 characters give 12 × log₂(86), about 77 bits, which the page labels Strong. Without symbols it drops to about 71.5 bits. Going to 16 characters adds more strength than any single character type.

### How does an XKCD password generator work?

The XKCD comic 936 idea is to string together random common words, like correct horse battery staple. Passphrase mode does this: each word is drawn at random from a 256-word list, so every word adds 8 bits. Seven words give 56 bits and eight give 64.

### Is this a Diceware passphrase generator?

It follows the same principle, random words joined by a separator, but uses a 256-word list instead of the 7,776-word Diceware list rolled with five dice. A Diceware word is worth about 12.9 bits and one of ours 8, so use about 1.6 times as many words for the same strength.

### How do I make a memorable password that is still strong?

Use Passphrase mode with seven or more words and a separator you like. Short, concrete words such as river, lemon or kite are easy to picture in order. Turn on Capitalize each word if a site demands an uppercase letter.

### Can I generate a random 4-digit PIN?

Yes. Choose PIN mode and leave Digits at 4. There are 10,000 possible PINs, about 13.3 bits, so each digit is equally likely and dates or patterns like 1234 are no more likely than any other draw.

### Are pronounceable random passwords weaker?

It builds strings that alternate consonants and vowels, like bokatimu, so you can read them aloud or type them from memory. The cost is strength: 10 letters give only 32 bits, versus about 47 for 10 random lowercase letters, so make them long.

### Can I generate passwords in bulk?

Yes. Open More options and raise How many, up to 50. Every row is drawn separately with the same settings and has its own copy button, which helps when issuing starter passwords to a group.

## Use from code or an AI agent

Free JSON API, no key needed. The answer is in `result.stats.primary`.

```bash
curl -X POST https://api.tools-directory.workers.dev/v1/tools/password-passphrase-and-pin-generator \
  -H 'Content-Type: application/json' \
  -d '{"inputs":{"mode":"password","length":20,"upper":true,"digits":true,"symbols":true,"count":5}}'
```

- Inputs (JSON Schema): https://directory.milunir.com/api/v1/tools/password-passphrase-and-pin-generator.json
- MCP server: https://api.tools-directory.workers.dev/mcp (tool `password_passphrase_and_pin_generator`)
- Docs: https://directory.milunir.com/docs/
