Skip to content
Password Generator Command Line
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Password Generator Command Line

By Aashish Koirala

GitHub Repository | Download Binary

Command line application to generate secure passwords for use in different sites. Written in F#. Uses PBKDF2 with 1000 iterations. Inspired by this thing.


  • Download and unzip the binary from the link above, OR:
  • Clone the source code and run build.cmd (make sure fsc.exe is in the path - this is just a single F# source file that needs to be compiled using the F# compiler).


genpass master-password site-name user-name [password-length]


  • master-password is your one and only secret password - needs to be at least 8 characters, no other restrictions.
  • site-name uniquely identifies the site for which your are generating the password. Use the same pattern across all sites for consistency (e.g. the TLD -,, etc.).
  • user-name is your user name for the site.
  • password-length (Optional) is how long you want the password to be. 16 by default. Must be 12 or more.


genpass lovecraft akoirala
genpass lovecraft akoirala123 30

The generated password will not be printed, instead it will be copied directly to the clipboard.


  • The site-name and user-name are concatenated and SHA256-hashed to get the salt.
  • A key is generated through PBKDF2 using master-password as the password, the salt from the previous step, 1000 iterations, and with the specified password length as the key size.
  • Each byte of the key is modulo'ed against lookup tables made up of alphanumeric characters and symbols to generate the final password.
You can’t perform that action at this time.