<p>In Bitcoin Core 0.17.0, they added a startup option <code>-upgradewallet</code> which does the upgrade to an HD wallet, and retains all history.</p>

CC BY-SA 4.0
2019-08-25T18:58:01.257Z
>Since Bitcoin Core 0.17, there is an automatic way to directly upgrade a wallet from non-HD to HD. Simply start Bitcoin Core with the the -upgradewallet option and have no other wallets (i.e. remove all -wallet= and wallet= options from the command line and bitcoin.conf respectively) being loaded. -upgradewallet does not work when multiple wallets are loaded. This will automatically generate a new seed and keypool while also retaining all of your old private keys and transactions so nothing is lost.
Jan Janssen
CC BY-SA 4.0
2019-08-25T15:37:29.270Z
2019-08-25T15:37:29.270Z
vick
<p>Since Bitcoin Core 0.17, there is an automatic way to directly upgrade a wallet from non-HD to HD. Simply start Bitcoin Core with the  the <code>-upgradewallet</code> option and have no other wallets (i.e. remove all <code>-wallet=</code> and <code>wallet=</code> options from the command line and bitcoin.conf respectively) being loaded. <code>-upgradewallet</code> does not work when multiple wallets are loaded. This will automatically generate a new seed and keypool while also retaining all of your old private keys and transactions so nothing is lost.</p>

<hr>

<p>Prior to Bitcoin Core 0.17, there was no mechanism for migrating non-HD wallets to HD wallets. If you don't want to upgrade to 0.17+, then migrating your coins to an HD wallet is possible, at the expense of invalidating your backups and a bit of work.</p>

<p>First you will need to backup your current wallet. Stop Bitcoin Core and back up your <code>wallet.dat</code> file. Now rename your <code>wallet.dat</code> file to something else, like <code>wallet-orig.dat</code>. </p>

<p>Now start Bitcoin Core again. Bitcoin Core will create a new <code>wallet.dat</code> file. This one will be HD and that will be the file that you want to actually use later.</p>

<p>Once Bitcoin Core has started, encrypt your wallet and restart Bitcoin Core. Once you have restarted it, you should see no transactions and no (or one) addresses. Now get a couple of addresses and write them down somewhere. Stop Bitcoin Core again and backup your new <code>wallet.dat</code> file. Rename your new <code>wallet.dat</code> file to something else, like <code>wallet-new.dat</code> and rename your old <code>wallet.dat</code> file (<code>wallet-orig.dat</code>) back to <code>wallet.dat</code>.</p>

<p>Start Bitcoin Core again. You should see your old addresses and transactions. Go to the Send tab and send your Bitcoin to the addresses that you wrote down earlier.</p>

<p>Finally, stop Bitcoin Core, rename your new <code>wallet.dat</code> file (<code>wallet-new.dat</code>) back to <code>wallet.dat</code>. Back it up again and start Bitcoin Core again. You should now see transactions from your previous wallet sending Bitcoin to your new wallet. Once those transactions have confirmed, you have successfully migrated your Bitcoin from a non-HD Bitcoin Core wallet to a HD Bitcoin Core wallet.</p>

CC BY-SA 4.0
2017-10-21T03:06:36.357Z
2019-08-25T16:49:46.710Z
2019-08-25T16:49:46.710Z
Ava Chow
<p>I created a wallet before Bitcoin Core 0.13.0 was released so my wallet is not a HD wallet. How do I make my wallet a HD wallet?</p>

CC BY-SA 3.0
2017-10-22T21:52:37.813Z
A thumbs up because it's your first question, and have given so many answers.
croraf
CC BY-SA 4.0
2020-11-27T13:14:34.823Z
He is basically just asking when he is also answering himself. :)
bomben
<bitcoin-core><bip32-hd-wallets>
How do I migrate my Bitcoin Core wallet to an HD wallet?
Ava Chow
# How do I migrate my Bitcoin Core wallet to an HD wallet?

(Asked by: username_0 on 2017-10-21)

I created a wallet before Bitcoin Core 0.13.0 was released so my wallet is not a HD wallet. How do I make my wallet a HD wallet?

**Tags:** bitcoin-core, bip32-hd-wallets

> **Comments:**
> **username_1**: A thumbs up because it's your first question, and have given so many answers.  
> **username_2**: He is basically just asking when he is also answering himself. :)  

---

## 2 answers

### Answer by username_0 on 2017-10-21. Score: 4 | Accepted answer

Since Bitcoin Core 0.17, there is an automatic way to directly upgrade a wallet from non-HD to HD. Simply start Bitcoin Core with the the `-upgradewallet` option and have no other wallets (i.e. remove all `-wallet=` and `wallet=` options from the command line and bitcoin.conf respectively) being loaded. `-upgradewallet` does not work when multiple wallets are loaded. This will automatically generate a new seed and keypool while also retaining all of your old private keys and transactions so nothing is lost.

---

Prior to Bitcoin Core 0.17, there was no mechanism for migrating non-HD wallets to HD wallets. If you don't want to upgrade to 0.17+, then migrating your coins to an HD wallet is possible, at the expense of invalidating your backups and a bit of work.

First you will need to backup your current wallet. Stop Bitcoin Core and back up your `wallet.dat` file. Now rename your `wallet.dat` file to something else, like `wallet-orig.dat`.

Now start Bitcoin Core again. Bitcoin Core will create a new `wallet.dat` file. This one will be HD and that will be the file that you want to actually use later.

Once Bitcoin Core has started, encrypt your wallet and restart Bitcoin Core. Once you have restarted it, you should see no transactions and no (or one) addresses. Now get a couple of addresses and write them down somewhere. Stop Bitcoin Core again and backup your new `wallet.dat` file. Rename your new `wallet.dat` file to something else, like `wallet-new.dat` and rename your old `wallet.dat` file (`wallet-orig.dat`) back to `wallet.dat`.

Start Bitcoin Core again. You should see your old addresses and transactions. Go to the Send tab and send your Bitcoin to the addresses that you wrote down earlier.

Finally, stop Bitcoin Core, rename your new `wallet.dat` file (`wallet-new.dat`) back to `wallet.dat`. Back it up again and start Bitcoin Core again. You should now see transactions from your previous wallet sending Bitcoin to your new wallet. Once those transactions have confirmed, you have successfully migrated your Bitcoin from a non-HD Bitcoin Core wallet to a HD Bitcoin Core wallet.


---

### Answer by username_3 on 2019-08-25. Score: 1

In Bitcoin Core 0.17.0, they added a startup option `-upgradewallet` which does the upgrade to an HD wallet, and retains all history.

> **Comments:**
> **username_4**: >Since Bitcoin Core 0.17, there is an automatic way to directly upgrade a wallet from non-HD to HD. Simply start Bitcoin Core with the the -upgradewallet option and have no other wallets (i.e. remove all -wallet= and wallet= options from the command line and bitcoin.conf respectively) being loaded. -upgradewallet does not work when multiple wallets are loaded. This will automatically generate a new seed and keypool while also retaining all of your old private keys and transactions so nothing is lost.  

---

