Generate strong passwords that just work everywhere.
Effortlessly create secure passwords, Diceware passphrases, and cryptographic tokens. Native integration with Wayland, X11, macOS, and remote SSH sessions via OSC 52.
Instant Browser Generator
All browser generation utilizes the cryptographically secure window.crypto.getRandomValues API. No data ever leaves your device.
Live Web Generator
Why Passgen?
Engineered for security engineers, system administrators, and developers.
Full Clipboard Ecosystem
Automatic detection and support for Wayland (wl-copy), X11 (xclip / xsel), macOS (pbcopy), and remote SSH clipboard sharing with OSC 52.
Multi-Algorithm Pool
Generates alphanumeric tokens, length-obedient passwords, Diceware word passphrases, numeric PINs, and high-entropy hash streams using resilient random sources.
Headless & CI/CD Ready
Zero crash policy in headless servers, Docker containers, and automated deployment pipelines. Output seamlessly pipes directly to stdout with -n / --no-clip.
Installation & Usage
Get up and running on Linux, macOS, or Nix in seconds.
curl -sSL https://raw.githubusercontent.com/joshuacox/passgen/master/bootstrappassgen.sh | sh
Clones and installs passgen directly into /usr/local/bin.
git clone https://github.com/joshuacox/passgen.git cd passgen sudo make install
Installs executable and man pages locally with reproducible permissions.
CLI Cheat Sheet & Command Options
Full flag reference for daily terminal usage.
| Flag / Command | Description | Example |
|---|---|---|
| passgen [N] | Generate password of length N (default: 16) and copy to clipboard | passgen 24 |
| -w, --words [N] | Generate a Diceware-style memorable passphrase composed of N words | passgen -w 5 |
| -p, --pin [N] | Generate a numeric PIN code of length N | passgen -p 6 |
| -n, --no-clip | Print to stdout only, without touching clipboard registers | passgen -c 3 -n |
| -c, --count [N] | Generate multiple passwords or tokens in a single execution | passgen -c 10 |
| --osc52 | Emit ANSI OSC 52 terminal copy escapes (works seamlessly over SSH) | passgen --osc52 |
| --clear [SEC] | Automatically clear clipboard contents after SEC seconds for security | passgen --clear 30 |
| -t, --test | Run built-in test suite across all cryptographic generator engines | passgen -t |
Entropy & Password Security Standards
NIST SP 800-63B Compliance
Passgen promotes modern password recommendations: longer length rather than arbitrary complexity requirements. A 5-word Diceware passphrase provides over 64 bits of entropy while remaining memorable.
Cryptographic PRNG Sources
Passgen relies on kernel CSPRNG devices (/dev/urandom), OpenSSL cryptographic primitives, or standard Web Crypto API implementations rather than predictable pseudo-random seeds.