<p>Using bitcoin-qt for an interface:</p>

<p>listaddressgroupings</p>

<p>is the command which will list all addresses in use. Run it in the debug console window from the 'Help/Debug Window' screen.</p>

<p>Then, apparently, you can dump all the private keys, but only one at a time, using dumpprivkey for each key.</p>

<p>Seems lame.</p>

CC BY-SA 3.0
2013-03-14T11:02:17.670Z
2013-03-14T11:02:17.670Z
SnowDog
<p>Just go to your QT Wallet Console (Help -> Debug Window -> Console)</p>

<pre><code>dumpwallet "C:/users/yout-user-name/dumpwallet.txt" 
</code></pre>

<p>The command will export every of your private keys into that text file. </p>

<p>P/s: in case you have encrypted Wallet before you need run this command before run dumpwallet </p>

<pre><code>walletpassphrase "your pass phrase" 600
</code></pre>

CC BY-SA 4.0
2019-01-04T02:49:09.827Z
2019-01-04T02:49:09.827Z
rcruz
<p>You could send the dumpprivkey JSON-RPC call to the client.  It takes a single parameter of BitcoinAddress to reveal the private key for that specific address.</p>

<p>To export all private keys for all addresses, you would have to call listreceivedbyaddress to list the addresses and then call dumpprivkey for each.</p>

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

CC BY-SA 3.0
2012-09-05T01:31:24.460Z
That won't dump keys associated with 'change' addresses.
gavinandresen
CC BY-SA 3.0
2012-09-07T23:34:40.067Z
According to the documentation...

"Listing the bitcoin addresses in your wallet is easily done via listreceivedbyaddress. It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true."
Jason Southwell
CC BY-SA 3.0
2012-09-05T00:17:57.190Z
2012-09-05T00:17:57.190Z
Jason Southwell
<p>I know that PyWallet has a -dumpwallet but without using pywallet, how can I export all the addresses and privatekeys with the stock bitcoind?</p>

<p>Is there an API command that lists all addresses held by the wallet?</p>

<client><wallet><bitcoind><private-key><private-key-export>
How can I export all my private keys using bitcoind?
Stephen Gornick
# How can I export all my private keys using bitcoind?

(Asked by: username_0 on 2012-09-04)

I know that PyWallet has a -dumpwallet but without using pywallet, how can I export all the addresses and privatekeys with the stock bitcoind?

Is there an API command that lists all addresses held by the wallet?

**Tags:** client, wallet, bitcoind, private-key, private-key-export


---

## 3 answers

### Answer by username_3 on 2012-09-05. Score: 4 | Accepted answer

You could send the dumpprivkey JSON-RPC call to the client. It takes a single parameter of BitcoinAddress to reveal the private key for that specific address.

To export all private keys for all addresses, you would have to call listreceivedbyaddress to list the addresses and then call dumpprivkey for each.

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

> **Comments:**
> **username_4**: That won't dump keys associated with 'change' addresses.  
> **username_3**: According to the documentation...  "Listing the bitcoin addresses in your wallet is easily done via listreceivedbyaddress. It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true."  

---

### Answer by username_1 on 2013-03-14. Score: 3

Using bitcoin-qt for an interface:

listaddressgroupings

is the command which will list all addresses in use. Run it in the debug console window from the 'Help/Debug Window' screen.

Then, apparently, you can dump all the private keys, but only one at a time, using dumpprivkey for each key.

Seems lame.


---

### Answer by username_2 on 2019-01-04. Score: 1

Just go to your QT Wallet Console (Help -> Debug Window -> Console)
dumpwallet "C:/users/yout-user-name/dumpwallet.txt" 

The command will export every of your private keys into that text file. 
P/s: in case you have encrypted Wallet before you need run this command before run dumpwallet 
walletpassphrase "your pass phrase" 600


---

