I have a wallet in electrum. I would like to get my wallet master private key. I don't know how to get that. Please, anyone, suggest me steps to get my key

Thanks in Advance

3 Answers 3


There are a few ways to do this:

  • If you're on linux or macosx you can do so via the command line:

electrum getmasterprivate

  • Alternatively run electrum and go to wallet menu > password to remove your password temporarily. Then go to view menu > show console and on the console tab use this command to view your xprv:


Then set a password again via wallet menu > password.

Note that there is another console command wallet.keystore.get_master_private_key('yourpasswordhere') that lets you do the same thing without having to remove the password first but the downside of that is that your password is saved in console history (specifically config file in electrum data directory) and can be scrolled through by pressing the up arrow while on the console tab.


AFAIK, the master private key itself is not revealed. However Electrum will show you the seed words from which the master private key is generated from. To get your seed, you can go to Wallet > Seed and enter your passphrase if you have one. Then a dialog will appear which has your seed words. Note that these seed words are not BIP 39 seed words so they are not compatible with other wallet software.


In the answer of Abdussamad above both commands work fine in Electrum console

>>> getmasterprivate()

>>> wallet.keystore.xprv()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.