All in your head: Creating a Bitcoin ‘brainwallet’ with Diceware

Digital freedomTips & tricks
5 mins
Bitcoin symbol emerging from a brain

One way to store Bitcoin is in your head. You do this by remembering a list of words—a method called brainwallet.

The words need to be random and secure, which can be achieved using Diceware.

In such a brainwallet (also called a hierarchical deterministic wallet, or HD wallet), your private and public Bitcoin keys are generated from a list of words instead of a number generator—just like the list we got from rolling the die. This list of words is called a seed.

The seed technique makes it possible for humans to remember large and complex Bitcoin addresses. Instead of using a large string of numerical digits as your Bitcoin key, you can use your randomly generated word seed instead. Meaning you can quite literally put money in your head.

[Know how to stay private. Sign up for the ExpressVPN Blog Newsletter.]

A few great wallets allow you to use seed words for your Bitcoin keys, such as Breadwallet (iOS), Mycelium (Android), and Electrum (Windows, Mac, and Linux). These services do not allow you to enter your own words as a seed; rather, they insist on generating the words themselves with an electronic Diceware algorithm. This is done to protect uninformed users from creating wallets with non-random words, such as song lyrics, then losing their Bitcoins to someone else who has used the same lyrics as their own seed words.

To demonstrate how word seeds work, we used Electrum to create a brainwallet and a separate watch-only Bitcoin wallet. This watch-only wallet can be filled up with actual Bitcoins and used to monitor your Bitcoin accounts, but since it doesn’t have a private key, nothing can be stolen.

Read more on different ways to store your Bitcoin:

How to use Electrum to create your brainwallet for Bitcoin

You can download Electrum from its official website. There are versions for Windows, Mac, Android, and Linux. You can also find Electrum pre-installed in the operating system Tails, which we recommend and have used in our example.

A Live-USB (an operating system run from a USB stick) is recommended when setting up your brainwallet, as a computer could be infected with malware without your knowledge.

download electum

Create a new Bitcoin wallet

Create a wallet by clicking on File > New/Restore. Confirm the file name wallet_1.

Select Create New Wallet, then Standard Wallet. If possible, we will also choose to create a Segwit wallet to save on transaction fees.

electum install wizard

Thirteen English words will appear in the next window.

Write these words down on a piece of paper, then click Next.

install electrum

You will be asked to enter the previously generated words in the next window. This will confirm that you have written down the correct words, in the correct order, and without typos.


Next, you will be asked to set a password. If you are relying solely on your paper backup, this password is not important. If you intend to use this wallet regularly, generate a password with your password manager. In this case you will also have to set persistence in Tails, and specifically enable Electrum files to be persistent.

Hit Confirm, and your addresses will be generated by Electrum. You can see them all under Addresses.


Next we will export our Master Public Keys for our watch-only wallet. You can view this key under Wallet > Master Public Keys.


Save this key in a text file called xpub.txt on your USB stick or hard drive.

The public key beginning with xpub is not security-relevant, so you do not need to worry about it being stolen. Anybody who has this key will be able to find which Bitcoin addresses belong to you, but they will not be able to steal your Bitcoins.

Remember your seed words, then delete your wallet

If you remember your seed words (or have them written down on a piece of paper) and your public key is saved in xpub.txt, you can delete your wallet.

You can find the file wallet_1 as listed below. Make sure to also delete it from your trash bin:

On Windows:

  • Show hidden files
  • Go to Users/YourUserName/AppDataRoaming/Local/Electrum/wallets

On Mac:

  • Open Finder
  • Go to folder (shift+cmd+G) and type ~/.electrum/wallets

On Linux:

  • Home Folder
  • Go -> Location and type ~/.electrum/wallets

Congratulations! Your Bitcoin wallet now exists solely in your head.

Keep your seed words safe

You must remember your seed words! If you chose to back them up on a piece of paper, you must keep it safe. If you lose this paper and forget your seed words, you will lose all your Bitcoins. Anyone who knows your seed words can steal your Bitcoins.

Do not put any paper copy of your seed words into a scanner or photocopier—and keep it out of the reach of cameras or spying eyes. A safe, or somewhere you are comfortable keeping large amounts of cash or other valuable documents, would be a great place to store a paper backup.

Create a watch-only wallet to see your Bitcoins

A watch-only wallet will only allow you to monitor your balance and receive money. As a result, you do not have to worry about keeping this wallet secure. You only need to worry about remembering your seed words.

Open Electrum, and click on File > New/Restore again. Enter a wallet name and select Restore a Wallet or Import Keys, then Standard Wallet.

Paste your xpub key into the field in the next window, or click on the folder icon and select the xpub.txt that you saved.


A notification will inform you that this is a watch-only wallet.

You can see your addresses under Addresses. You can also see the balance of these addresses, or send money to them.


Restore your wallet to spend your money

If you want to spend the Bitcoins you have gathered in your mind, you’ll first need to restore the wallet you deleted.

Open Electrum and select File > New/Restore.

Enter a wallet name and select Restore a Wallet or Import Keys, then Standard Wallet.

Enter a password. We recommend you create one with ExpressVPN’s Random Password Generator or your password manager.

Confirm this step by clicking OK.

Electrum will generate your addresses, and you will be able to see your balance and make payments. For each payment, you will need to enter your password.

Lexie is the blog's resident tech expert and gets excited about empowerment through technology, space travel, and pancakes with blueberries.