<p>From <code>bitcoin-qt</code>, click Help->Debug and open the Console tab. Type in <code>dumpwallet &lt;outputFileName&gt;</code>, making sure that of course, the output filename isn't <code>wallet.dat</code> or it may overwrite your wallet.</p>

<p>This command creates a plain text version of your wallet with all private/public key pairs in WIF format.</p>

<p>You may need to configure your clients to point to the correct directory containing your wallet.dat with the <code>-datadir</code> command line option, or if you have a custom config file use <code>-conf</code>.</p>

<p>You can also use the <code>dumpwallet</code> command with <code>bitcoin-cli</code> if you have a <code>bitcoind</code> running.</p>

CC BY-SA 4.0
2019-12-29T15:35:06.360Z
2019-12-29T15:35:06.360Z
Mark H
<p>I have old <code>wallet.dat</code> files of <strong>Bitcoin</strong>, <strong>Litecoin</strong>, <strong>Bitcoin Cash</strong>, <strong>Omnicore</strong>. My Bitcoin Cash wallet.dat has unbroadcasted transactions inside, so I am afraid that others might also have unbroadcasted transactions.</p>

<p>So, currently nodes are not running and I want to dump private keys of those wallets and import into new wallets in a way so that old unbroadcasted transactions are not sent.</p>

<p>What would be the best way to get private keys without loosing funds and without syncing blockchain (don't want to sync because of a risk that transactions will be broadcasted to the network)?</p>

<p>Thanks!</p>

<wallet><wallet-recovery><wallet.dat><private-key-export><recover-private-key>
How to get the private keys out of old wallet.dat without syncing blockchain
Igoris Skinderis
# How to get the private keys out of old wallet.dat without syncing blockchain

(Asked by: username_0 on 2019-12-29)

I have old `wallet.dat` files of **Bitcoin**, **Litecoin**, **Bitcoin Cash**, **Omnicore**. My Bitcoin Cash wallet.dat has unbroadcasted transactions inside, so I am afraid that others might also have unbroadcasted transactions.

So, currently nodes are not running and I want to dump private keys of those wallets and import into new wallets in a way so that old unbroadcasted transactions are not sent.

What would be the best way to get private keys without loosing funds and without syncing blockchain (don't want to sync because of a risk that transactions will be broadcasted to the network)?

Thanks!

**Tags:** wallet, wallet-recovery, wallet.dat, private-key-export, recover-private-key


---

## 1 answers

### Answer by username_1 on 2019-12-29. Score: 1

From `bitcoin-qt`, click Help->Debug and open the Console tab. Type in `dumpwallet <outputFileName>`, making sure that of course, the output filename isn't `wallet.dat` or it may overwrite your wallet.

This command creates a plain text version of your wallet with all private/public key pairs in WIF format.

You may need to configure your clients to point to the correct directory containing your wallet.dat with the `-datadir` command line option, or if you have a custom config file use `-conf`.

You can also use the `dumpwallet` command with `bitcoin-cli` if you have a `bitcoind` running.


---

