Generate and validate BIP-39 mnemonic sentences
The use of this tool does not guarantee security or suitability for any particular use. Please review the code and use at your own risk.
This step assumes you have Go compiler toolchain installed on your system.
go install github.com/kubetrail/bip39@latest
Install shell completion. For instance bash
completion can be installed
by adding following line to your .bashrc
:
source <(bip39 completion bash)
bip39 gen
chaos mosquito citizen bone pencil crunch genuine this dice noise when digital grass urge jungle decade melody typical improve army couch degree anxiety rifle
bip39 gen --length=12
ankle already sight barely skate lazy admit estate plug sunset machine help
bip39 gen --length=15
royal guilt glad stereo match web muffin enough silent seek owner hungry expect resemble fault
bip39 gen --length=12 --language=English
walk pudding hotel ordinary unknown detect simple typical leg ridge armor bitter
bip39 gen --length=12 --language=Japanese
ただしい ほたる あける おおどおり からい はんい たいぐう めんきょ ふとん ねむたい てわけ もえる
Entering correct mnemonic will produce no output indicating that the input is valid
bip39 validate
Enter mnemonic: mosquito citizen bone pencil crunch genuine this dice noise when digital grass urge jungle decade melody typical improve army couch degree anxiety rifle
bip39 validate --language=Japanese
Enter mnemonic: ただしい ほたる あける おおどおり からい はんい たいぐう めんきょ ふとん ねむたい てわけ もえる
Entering invalid mnemonic will result in an error
bip39 validate
Enter mnemonic: this is an invalid mnemonic
Error: invalid mnemonic
Usage:
bip39 validate [flags]
Flags:
-h, --help help for validate
--language int Language (default 1)
Global Flags:
--config string config file (default is $HOME/.bip39.yaml)
Error: invalid mnemonic
Mnemonic is not any arbitrary list of words. The words come from a predefined list and has a structure (last word has checksum). Altering the sequence of words from a correct mnemonic will also result in error
bip39 gen --length=12
sausage unhappy suffer cost wedding air about maid future expand solar stumble
bip39 validate
Enter mnemonic: unhappy sausage suffer cost wedding air about maid future expand solar stumble
Error: invalid mnemonic
Usage:
bip39 validate [flags]
Flags:
-h, --help help for validate
--language int Language (default 1)
Global Flags:
--config string config file (default is $HOME/.bip39.yaml)
Error: invalid mnemonic
Several wallets only support english mnemonics. Mnemonics can be translated between languages in the sense that the underlying entropy is preserved.
bip39 gen --language=Japanese
ちかい ばいばい いずみ たおる おとなしい とくべつ もくてき たりきほんがん ふっかつ うける ざいりょう むかえ むすう けもの ちいき いがい きさく こうない げぼく うわさ そそぐ こんぽん にうけ はんい
English language equivalent mnemonic can be obtained from the above mnemonic:
bip39 translate --from-language=Japanese --to-language=English
Enter mnemonic: ちかい ばいばい いずみ たおる おとなしい とくべつ もくてき たりきほんがん ふっかつ うける ざいりょう むかえ むすう けもの ちいき いがい きさく こうない げぼく うわさ そそぐ こんぽん にうけ はんい
napkin school another mass caution pole universe mix stay become flock tray trophy electric myth already coyote essay egg book left first quit shoot
Hex seeds are directly used for key generation. These hex seeds are generated using mnemonic data and optional passphrase.
All mnemonics are translated to English before seed is generated except when mnemonic validation is explicitly switched off
For instance, let's generate a Japanese language mnemonic and translate it to English
bip39 gen --language=japanese --length=12
もくようび りきさく どうかん はつおん せんよう ぐんて げいじゅつ ぴっちり さとし こまる どぶがわ えつらん
bip39 translate --from-language=japanese --to-language=english
Enter mnemonic: もくようび りきさく どうかん はつおん せんよう ぐんて げいじゅつ ぴっちり さとし こまる どぶがわ えつらん
unknown wasp pipe select knock divide doll smoke fringe feature present bright
We can see that the seed generated using both these mnemonics are the same
bip39 seed --language=english
Enter mnemonic: unknown wasp pipe select knock divide doll smoke fringe feature present bright
29cc2a90e4f6cdd029cd1ff389c950ddcc1d895031c8cb3182af799ff37f69e9fe0f0de8b3a5d808fc9fe2e773c1a005d8d00c9a1a7f7d7a17e870234980e62e
bip39 seed --language=japanese
Enter mnemonic: もくようび りきさく どうかん はつおん せんよう ぐんて げいじゅつ ぴっちり さとし こまる どぶがわ えつらん
29cc2a90e4f6cdd029cd1ff389c950ddcc1d895031c8cb3182af799ff37f69e9fe0f0de8b3a5d808fc9fe2e773c1a005d8d00c9a1a7f7d7a17e870234980e62e
Following mnemonics are interestingly valid. There are over 100 such mnemonic sentences.
Needless to say, never use these mnemonics or any such mnemonics that are not random despite the fact that they are valid.
twelve twelve twelve twelve twelve twelve twelve twelve twelve twelve twelve twelve
valid valid valid valid valid valid valid valid valid valid valid valid
word word word word word word word word word word word word
all all all all all all all all all all all all
awesome awesome awesome awesome awesome awesome awesome awesome awesome awesome awesome awesome
believe believe believe believe believe believe believe believe believe believe believe believe
dilemma dilemma dilemma dilemma dilemma dilemma dilemma dilemma dilemma dilemma dilemma dilemma
life life life life life life life life life life life life
noble noble noble noble noble noble noble noble noble noble noble noble
bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon bacon
beef beef beef beef beef beef beef beef beef beef beef beef
cereal cereal cereal cereal cereal cereal cereal cereal cereal cereal cereal cereal
pumpkin pumpkin pumpkin pumpkin pumpkin pumpkin pumpkin pumpkin pumpkin pumpkin pumpkin pumpkin
salad salad salad salad salad salad salad salad salad salad salad salad
sugar sugar sugar sugar sugar sugar sugar sugar sugar sugar sugar sugar
tobacco tobacco tobacco tobacco tobacco tobacco tobacco tobacco tobacco tobacco tobacco tobacco
and many more...