
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
It works programmatically in node and in the browser too!
Generate human-readable1 passwords quickly and easily and specify what set of characters you want to generate the password from. By default it uses the full Latin-1 charset (execept for some ambiguous characters such as space and iIl etc) to maximize entropy.
It's best understood by looking at the examples.
1 Depends on how "readable" you consider AS$é§0 to be and if your font supports Latin-1 characters.
Default usage
$ passgen
cq@öÙ]ØúüÏ-7d3VÀï½:cížm-B7Å.ò
WIFI-friendly password
$ passgen -wnl 10
xy3zg6k12h
PIN code
$ passgen -nl 4
0162
Quick copy to clipboard
$ passgen | pbcopy
See the tests folder for more examples.
npm install pass-gen -g
$ passgen -h
Usage: passgen [options]
Options:
-h, --help output usage information
-V, --version output the version number
-n --numbers Use 0-9
-w --ascii Use a-z
-u --ASCII Use A-Z
-s --special Use special ASCII characters such as .,_:;@...
-W --latin Use Latin-1 chars such as åöäé...
-U --Latin Use uppercase Latin-1 chars such as ÅÖÄÉ...
-S --Special Use special Latin-1 chars such as £§±©...
-a --ambiguous Exclude ambiguous characters such as [space]"oO0...
-x --extra <custom charset> Use a custom set
-l --length <integer> Set number of characters, Default: 30
-i --interactive Interactive mode
require('pass-gen')(options, [length])
See command-line options for what these options do
var passgen = require('pass-gen');
// Default
passgen();
// Using array
passgen(['ascii', 'ASCII'], 10);
// Using object
passgen({
ascii: true,
ASCII: 1,
numbers: 'what you set here doesn\'t matter',
extra: '@=/.', // but this does
length: 15 // and this
});
Note that an options object must be used if you want to specify a custom charset.
Compile with browserify. See Node examples.
Please create an issue if you find something broken or would like a new feature. Do so even if you want to fix it yourself, so I know. Work of and issue pull-request to the develop branch.
Run make test to run tests. Any added or changed functionality must be tested.
MIT
FAQs
An easy-to-use command-line password generator
We found that pass-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.