How to export private keys from Bitcoin Core
In Bitcoin Core, you can use the dumpprivkey
command.
Once you have your private key, guard it very carefully keeping it very secure and, do the following in Bitcoin Core to gey your private key (once for every individual address):
- Open Bitcoin Core.
- Go to Help --> Debug.
- Go to the Console tab.
- type:
dumpprivkey "{address}"
- Do step 4 once for each address with BTC in your Bitcoin Core wallet.
- Write down your private key exactly on paper only for security, or use copy and paste. Do not ever save the private key anywhere on a phone or computer.
Done. Note that you do not need to wait for Bitcoin Core to update before exporting your private key.
Usage:
>dumpprivkey "address"
Reveals the private key corresponding to 'address'.
Then the importprivkey can be used with this output
Arguments:
1. "address" (string, required) The bitcoin address for the private key
Result:
"key" (string) The private key
Examples:
> bitcoin-cli dumpprivkey "myaddress"
> bitcoin-cli importprivkey "mykey"
Importing private keys into Electrum
Then, you can import your private keys into Electrum.
- Open Electrum and go to Wallet --> Private Keys --> Import
- Exactly fill in all your private keys, one private key per line. Press enter for a new line.
- Click on Import.
- Done.
Electrum will update with the balance for all of your imported addresses.
Note: If you just do not have enough HDD storage for Bitcoin Core you can enable prune={MB>550}
in your bitcoin.conf
file to reduce the file storage requirements for the blockchain, accessible from Settings --> Options.