Command line

The same generator, in your terminal

@touheed/pwgen is the command-line version of this tool. It shares the same audited, dependency-free crypto core — so it's just as unbiased and just as offline, with nothing ever leaving your machine.

npm install -g @touheed/pwgen

v0.1.1 · MIT · Node 18+

See it in action

Common commands

pwgen
A strong 20-character password.
pwgen -l 32 -c 5
Five 32-character passwords at once.
pwgen -x -u -b
Exclude ambiguous chars, no repeats, begin with a letter.
pwgen --no-symbols
Letters and digits only.
pwgen passphrase -w 6 -C -d
Six capitalized words plus a random digit.
pwgen check 'mypass'
Estimate a password's strength (entropy + label).
echo -n secret | pwgen check
Read from stdin — keeps it out of shell history.
pwgen --copy
Copy straight to the clipboard.

Run pwgen --help (or pwgen <command> --help) for every option. Secrets print to stdout and entropy/status to stderr, so pwgen | pbcopy stays clean.

Why you can trust the CLI too

  • Same audited core. Randomness comes only from Web Crypto with unbiased rejection sampling — never Math.random(), never modulo bias.
  • Fully offline. A CLI makes no network calls. --copy shells out to your OS clipboard tool; nothing is sent anywhere.
  • Open source. The whole package is small and dependency-light — read every line on GitHub.

Prefer the browser? Open the web generator →