<p>There are a few ways to do this:</p>

<ul>
<li>If you're on linux or macosx you can do so via the command line:</li>
</ul>

<p><code>electrum getmasterprivate</code></p>

<ul>
<li>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:</li>
</ul>

<p><code>wallet.keystore.xprv</code></p>

<p>Then set a password again via wallet menu > password.</p>

<p>Note that there is another console command <code>wallet.keystore.get_master_private_key('yourpasswordhere')</code> 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.</p>

CC BY-SA 4.0
2018-05-10T13:45:25.427Z
2018-05-10T13:45:25.427Z
Abdussamad
<p>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.</p>

CC BY-SA 4.0
2018-05-10T06:50:40.577Z
2018-05-10T06:50:40.577Z
Ava Chow
<p>In the answer of Abdussamad above both commands work fine in Electrum console</p>
<pre><code>&gt;&gt;&gt; getmasterprivate()

&gt;&gt;&gt; wallet.keystore.xprv()
</code></pre>

CC BY-SA 4.0
2023-02-02T21:43:45.743Z
2023-02-02T21:43:45.743Z
melaxon
<p>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</p>

<p>Thanks in Advance</p>

<electrum>
How to get Master Private key in electrum wallet
user82970
# How to get Master Private key in electrum wallet

(Asked by: username_0 on 2018-05-10)

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

**Tags:** electrum


---

## 3 answers

### Answer by username_1 on 2018-05-10. Score: 9

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:

`wallet.keystore.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.


---

### Answer by username_2 on 2018-05-10. Score: 2

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.


---

### Answer by username_3 on 2023-02-02. Score: 2

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

```
>>> getmasterprivate()

>>> wallet.keystore.xprv()

```


---

