How to export your private keys from Electrum desktop wallet

In this post, I'm going to show you how you can export your private keys from Electrum desktop wallet. If you're interested in doing the same thing with the mobile version, you can check this article.

You should never share your private keys with someone you don't trust.

So to start, launch your wallet then head to the "addresses" tab, choose the address that you want to export its private key, right-click it, and select -> Private key as shown in the picture below.

If you cannot see the addresses tab, you need to go to the Menu -> View -> Show addresses

You will then be asked to type your password (assuming your wallet is encrypted). Do that.

A window should then show both your address and its private key:

That's it. You can now import, sweep or print your private key.

You can keep the prefix (p2wpkh) to help you remember which address you exported, but most of the other wallets don't support that so if you're going to import your PK to another wallet, make sure to remove the prefix first.

Now, if you're interested in exporting the private keys for all of our addresses, and not just one, you can do that by going to the Menu -> Wallet -> Private keys -> Export:

Type your password if you're asked to. A window will then appear with a list of your addresses along with the private keys (wait a bit, it might take a couple of seconds)

And you're done. You can then copy them, or export them as CSV or JSON.

If you're going to export the private keys as CSV or JSON, it would be better to delete the file as soon as you're done with it. Preferably, with a tool like Eraser, so it's impossible to recover.