passfather is very fast and powerful utility with zero dependencies to generate strong password or random string.
Table of contents
- Support browsers and Node.js;
- Multiple random number algorithmes such as Alea, KISS07, Kybos, LFib, LFIB4, MRG32k3a, Xorshift03. By default using getRandomValues for browsers and getRandomBytes for Node.js;
- Support seed with entropy;
- Optional using any of unicode chars (ranges). By default there are uppercase, lowercase, numbers and about ten symbols;
- Any length;
npm install --save passfather
yarn add passfather
It's very easy! Just import passfather and run it.
;const password = ;console; // Output "9g'Jta75Gl3w"
By default passfather doesn't require any options. But it's possible to pass options object to customize password.
;const password =;console; // Output "40rAe2hqiM0UzTmN"
NOTE: if option object is passed then it merges with default options object.
||Final string length|
||Pseudorandom Number Generator. Generating random string algorithm is using random numbers that generated by prng. Might be: default, Alea, KISS07, Kybos, LFib, LFIB4, MRG32k3a, Xorshift03.|
|seed||array||seed.js||Seed for prng. See random seed. NOTE: Default value doesn't have enough entropy. Please, using your own values.|
||UTF-8 char ranges that will using to generate random string. See below.|
ranges (custom chars)
Passfather can make password containing custom chars.
It's possible via ranges option.
;const password =;console; // Output "▋▆♟◥◢♎◥♚♞♚▆♚◥▆▉♝"
The ranges option is array of UTF-8 char ranges.
You can find all of them on unicode table
Example above contains UTF-8 chars with codes from 9800 to 9807 and from 9818 to 9823 (zodiac signs and chess figures).
The example also contains UTF-8 chars with codes from 9698 to 9701 and from 9606 to 9611 (geometric figures).
This means that password will necessarily contain one or more chess figures or zodiac signs and one or more geometric figures.
But it doesn't mean that password will contain zodiac signs and chess figures because they are part of one range.
If you want make password with zodiac signs and chess figures you should move chess figures to new range.
;const password =;console; // Output "♏◣♛◥♚♟♚♝♌▆♌♚♞▉♞♞"
Making new range you get guarantee that one of char from range will be part of password.
Ranges may using together with number, uppercase, lowercase or symbols option.
;const password =;console; // Output "♚!N◢♊q6DO1,3▉♌k5♞"
See contributing guideline.