I am switching from bitcoin-qt to Electrum, and it seems as if I will need to download the blockchain again. Can I copy and paste my wallet.dat into Electrum's files?
According to this FAQ:
In Electrum 2.0, you cannot import private keys in a wallet that has a seed. You should sweep them instead.
If you want to import private keys and not sweep them you need to create a special wallet that does not have a seed. For this, create a new wallet, select “restore”, and instead of typing your seed, type a list of private keys, or a list of addresses if you want to create a watching-only wallet.
You can get the private keys from Bitcoin Core using
dumpprivkey as described in Using dumpprivkey to make a paper backup.
If you export the private keys for the addresses you want to keep then you are literally your own bank, most wallets allow you to import private keys in some way. I don't know the specifics of doing it on Electrum though.
To export from bitcoin-qt go into the debug console from the menus, and enter
Keep that key safe - it is the key to all coins in that address now, past & future. Don't leave it on your desktop or dropbox, preferably carefully copy and paste it into the other wallet without writing to disk.
I have to disagree with the other 2 answers at the time of this writing. While indeed wallet.dat contains all the critical information, and in theory you could just use it with another application, in practice the wallet file format is not consistent between applications, and AFAIK you cannot use that file elsewhere.
Your best course of action depends on your needs, but it's probably to export your private keys, import them elsewhere (such as blockchain.info), and send the coins to the wallet you want to use going forward.
This question is already answered in the Electrum tutorials http://electrum.org/tutorials.html#switching-to-electrum
What to do with my old addresses and wallet when switching to Electrum?
The best way to switch to Electrum is to send all the bitcoins you have on your old wallet to one of the addresses on your Electrum wallet. This way you'll have all your bitcoins secured with your seed.
You could import the private keys from your old client, but you will have to keep a backup of those keys separately as they won't become part of your Electrum seed.
Remember not to totally delete your wallet.dat if you gave your addresses for the deposite to other people
- Start Bitcoin Core with the
wallet.datyou want to export
- Dump your private keys via Bitcoin Core's Console using
- You'll get a list of private key to address pairs in the following format:
L4ysibEFMBQc3hfr7tvUyV4nBP1YQ3AgDewszoYq5czMtXotmmro 2020-08-21T14:36:58Z change=1 #addr=bc1qpw40dkvcj23zt3efvdwqr7ddfunwktx11f3tjf
- Extract all private keys (they are in the first column, e.g.
- Create a new Electrum wallet, select "Import Bitcoin addresses or private keys", convert your keys according to the rules available by clicking on "Info" button (you may not need to convert if your
wallet.datis quite old) and you're good to go!
The above is tested on Bitcoin Core 0.20.1 and Electrum 4.0.2.