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

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

CC BY-SA 3.0
2013-10-19T14:16:55.993Z
2013-10-19T14:38:32.250Z
2013-10-19T14:38:32.250Z
ripper234
<p>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.</p>

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

<p>To get the list of Bitcoin addresses in your wallet, you can use:</p>

<pre><code>listreceivedbyaddress 0 true
</code></pre>

CC BY-SA 3.0
2013-10-19T14:15:35.957Z
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
CC BY-SA 3.0
2013-02-24T08:40:38.267Z
2013-02-24T08:47:26.647Z
2013-02-24T08:47:26.647Z
Stephen Gornick
<p>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.</p>

<p>Command to export your private key:
dumpprivkey YourBitCoinPublicAddress</p>

<p>Command to import your private key:
importprivkey YourBitCoinPrivateKey</p>

<p>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.</p>

<p><a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list" rel="nofollow">https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list</a></p>

CC BY-SA 3.0
2014-01-24T20:17:39.953Z
2014-01-24T20:17:39.953Z
Mike
<p><code>dumpprivkey</code> takes as an argument the public address and returns private key for this address - if you own it in this wallet.</p>
<p>So you can get private key for each given public address in this particular wallet.</p>
<p>If you want to get more private keys from this wallet just dump the wallet with command <code>dumpwallet filename.ext</code>. You will get private keys and corresponding public addresses for the whole wallet.</p>
<p><strong>Surely DO NOT share any of the private keys with anybody!</strong></p>

CC BY-SA 4.0
2021-10-29T17:35:46.683Z
2021-10-29T17:35:46.683Z
pbies
<p>Trying to use this posted method:</p>

<p>To export a private key from your Satoshi bitcoin-qt client:</p>

<pre><code>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
</code></pre>

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

<p>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.] </p>

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

<p>Any help would be very appreciated.</p>

CC BY-SA 3.0
2014-12-14T04:18:50.887Z
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!
Luke Dashjr
<private-key-export>
How do I export my private keys from my Bitcoin-Qt client?
user2865
# How do I export my private keys from my Bitcoin-Qt client?

(Asked by: username_0 on 2013-02-10)

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.

**Tags:** private-key-export

> **Comments:**
> **username_1**: 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!  

---

## 4 answers

### Answer by username_2 on 2013-10-19. Score: 16

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


---

### Answer by username_3 on 2013-02-24. Score: 11

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

> **Comments:**
> **username_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.  

---

### Answer by username_4 on 2014-01-24. Score: 3

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.

<https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list>


---

### Answer by username_5 on 2021-10-29. Score: 0

`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!**


---

