Trying to use this posted method:

To export a private key from your Satoshi bitcoin-qt client:

launch your bitcoin client as usual and wait for it to load the blockchain and start up
click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab
type: walletpassphrase "your walletpassphrase here" 600
type: dumpprivkey [your bitcoin address here]
this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
type: walletlock

I do not understand what "your walletpassphrase here" means. I do not have a wallet pass phrase to the best of my knowledge.

Also, I am a bit of an amateur at this and I still don't understand the "your public key here"..... is that the address that corresponds to your wallet? [Update: Yes, the bitcoin address.]

Trying to export the private key to another wallet because the bitcoin wallet has taken 2 days to sync and is still not done.

Any help would be very appreciated.

  • Any help on how to do this for client version .4? I know it had a security hole, which is why I never upgraded (I forgot my password)
    – user9715
    Commented Nov 30, 2013 at 7:59
  • What does it mean: (I folowed above instructions ) Invalid Bitcoin address (code -5) already solved the problem mercie
    – user10580
    Commented Dec 10, 2013 at 17:29
  • You shouldn't be touching keys. This is something that only someone debugging the wallet software should do, and you risk compromising your security and/or losing your bitcoins if you try to mess with them! Commented Dec 14, 2014 at 4:18

4 Answers 4


I believe that listreceivedbyaddress 0 true does not list the change addresses that are created as part of the normal client operation.

Starting from bitcoin 0.7, you should use bitcoind listaddressgroupings to get all the addresses, and then follow up as usual with dumpprivkey.


If you never encrypted your wallet, then you don't need to do the "walletpassphrase" command. That's only needed to unlock the wallet if it is protected with passphrase encryption.

As far as the public key for dumpprivkey, that is asking what Bitcoin address you want the private key for.

To get the list of Bitcoin addresses in your wallet, you can use:

listreceivedbyaddress 0 true
  • 2
    This is not good enough, as I found today. I believe this does not list internal change addresses that bitcoind creates when sending outgoing transactions. Starting from bitcoind 0.7, you can use listaddressgroupings, which lists all addresses.
    – ripper234
    Commented Oct 19, 2013 at 14:15

After you use the console command to export your private key you'll also need to execute another console command to import it. Both commands are listed below.

Command to export your private key: dumpprivkey YourBitCoinPublicAddress

Command to import your private key: importprivkey YourBitCoinPrivateKey

When I was trying to figure this out I found a list of all Bitcoin console commands. It's below for your reference. All of the console commands can be executed by opening up your Bitcoin wallet software, click on help, then Console.



dumpprivkey takes as an argument the public address and returns private key for this address - if you own it in this wallet.

So you can get private key for each given public address in this particular wallet.

If you want to get more private keys from this wallet just dump the wallet with command dumpwallet filename.ext. You will get private keys and corresponding public addresses for the whole wallet.

Surely DO NOT share any of the private keys with anybody!

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.