This tool builds commands for common Linux/Unix password generators and also includes an in-browser generator using crypto.getRandomValues().
| pwgen [flags] len count | Generate passwords. Without -s, creates pronounceable nonsense words. With -s, fully random. |
| -s | Secure: fully random instead of pronounceable. |
| -y | Include at least one symbol. |
| -B | Avoid ambiguous characters (0/O, 1/l/I). |
| -1 | One password per line (useful for piping). |
| apg -a algo -m min -x max | Algorithm 0 = pronounceable, 1 = random. Set min/max length. |
| -M mode | Character classes: S=special, N=numeric, C=capital, L=lowercase. Uppercase = include. |
| -E chars | Exclude specific characters from output. |
| openssl rand -hex N | N random bytes, hex-encoded (2 chars per byte). |
| openssl rand -base64 N | N random bytes, base64-encoded (4 chars per 3 bytes). |
| tr -dc 'charset' | Filter random bytes to your chosen character set. |
| head -c N | Take the first N characters after filtering. |
| LC_ALL=C | Required to ensure single-byte locale processing. |
| xkcdpass -n words | Generate a passphrase with N random words from a large wordlist. |
| -d delimiter | Character between words (default space). |
| --min / --max | Minimum and maximum word length. |
Uses crypto.getRandomValues() — the same CSPRNG that browsers use for TLS. Generates passwords or passphrases entirely in your browser. Nothing leaves your machine.
This is an educational tool. The commands it builds are real — they will do exactly what you tell them to. Some flags are destructive (deletion, overwriting, forced operations) and even non-destructive options can cause data loss or system trouble in the wrong circumstances.
• Always review the generated command before running it.
• Test on disposable files and directories first.
• If you do not understand what a flag does, look it up in the official manual page (man command).
The author of these pages is not responsible for any damage, data loss, or other consequences resulting from commands generated, copied, or run from this site. Use at your own risk.
| Entropy | A measure of password strength in bits. Each bit doubles the number of possibilities an attacker must try. A password with N bits of entropy has 2^N possible values. 40 bits is weak, 64 is decent, 80+ is strong. |
| CSPRNG | Cryptographically Secure Pseudo-Random Number Generator. A random number source suitable for security use. Examples: /dev/urandom, crypto.getRandomValues(), OpenSSL's RAND engine. Unlike Math.random(), a CSPRNG's output cannot be predicted. |
| Brute force | Trying every possible password until the right one is found. A 10-character password from 95 printable ASCII characters has 95^10 possibilities. At 1 billion guesses/second, that takes ~2,600 years. |
| /dev/urandom | A kernel-provided CSPRNG on Linux/Unix. Reads from the OS entropy pool. Safe for password generation. /dev/random blocks when entropy is low; /dev/urandom does not (and is still secure for passwords). |
| Passphrase | A password made of multiple words (e.g. "correct-horse-battery-staple"). Easier to remember than random characters. Entropy depends on wordlist size: a 4-word passphrase from a 7776-word list has ~51 bits. |
| Pronounceable password | A password designed to look like a plausible (but fake) word, making it easier to remember. pwgen and apg mode 0 generate these. Less entropy per character than fully random. |
| Character class | A category of characters: uppercase letters (26), lowercase letters (26), digits (10), symbols (~32). More classes = larger pool = more entropy per character. |
| Ambiguous characters | Characters that look similar and cause confusion: 0/O, 1/l/I. The -B flag in pwgen excludes these. Useful for passwords that will be read aloud or printed. |
| Base64 | An encoding that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). openssl rand -base64 produces ~1.33 characters per byte of randomness. |
| XKCD 936 | The famous XKCD comic arguing that a passphrase like "correct horse battery staple" is both stronger and more memorable than "Tr0ub4dor&3". The math: 4 words from 2048 = 2^44 possibilities. |
⚠ These tools build real shell commands. Review every command before running it. The author is not responsible for any damage, data loss, or other consequences resulting from commands generated, copied, or run from this site. Use at your own risk.
Send comments and bug reports to chris@chrisspackman.com.
Version 0.3.0 — Last updated: 2026-05-26
This page is Copyright © 2026
Chris Spackman <chris@chrisspackman.com>.
This web site developed entirely on GNU/Linux with Free / Open Source Software.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.