Password generation one-liners

Sometimes you need to generate a password using only commonly available tools. These commands generate passwords given a required strength in bits. For comparison, an 8-character alphanumeric password has a strength of log₂ 36⁸ ≈ 41 bits.

Generate an 12 × 8 = 96 bit password with the Base32 alphabet (using coreutils' base32 command):

Generate an 16 × 8 = 128 bit password with the Base64 alphabet (using python:

Generate a 32 × 8 = 256 bit passphrase using the Electrum wordlist:

Word lists

CategoryTechnote PasswordGeneration (last edited 2017-10-09 14:27:54 by sam)

© Sam Morris <>.
Content may be distributed and modified providing this notice is preserved.