Small, simple passphrase generator.
Zig build system updates
Updates for Zig master



You can also use your local clone with git send-email.


Passphrase is a small, simple passphrase generator.

builds.sr.ht status


I was using Bitwarden's passphrase generator, which is good, except it only uses English words, and is also very slow. So I made this one. It's pretty fast (over 6000 times faster than bw generate -p,) and you can use any wordlist. An English wordlist is included, and is the default.


The program is written in Zig, so you will need the Zig compiler, which is called zig in most package managers. You can also download a static build if it's not packaged for you.

To build and install the program:

zig build -Doptimize=ReleaseFast --prefix ~/.local

It installs an executable file in $PREFIX/bin, so that should be in your $PATH.

To run the tests:

zig build test


Use passphrase -h to see the available options. Some examples:

demontering vestlandsturnear pacemen

passphrase -x # add a random symbol
intimacy urvriden overprest$

passphrase -d # add a random digit
folkinitiativ elefantritt felfinneri0

passphrase -c # capitalise each word
Alligator Eignarlandi Armkraft

passphrase -s _ # change the separator

passphrase -s '' # use an empty separator

passphrase -w 6 # it should have 6 words
dobbeltleveranse skunkworks kubikfot veggtavlone freeridden polarimeter

passphrase -f path/to/english_words.txt # use different dictionary
likelihood impassible educational

passphrase -xdcs /

passphrase -p # generate a gibberish password

If the output is piped into another command, for example passphrase | wl-copy to put the passphrase in the clipboard, the ending newline is omitted, so that it can be safely pasted.