<blockquote>
<p><strong>what does the process to convert it involve?</strong></p>
</blockquote>
<p>The process is described in <a href="https://en.bitcoin.it/wiki/Wallet_import_format" rel="nofollow noreferrer">the Bitcoin Wiki page on WIF</a>:</p>
<blockquote>
<ol>
<li>Take a private key<br />
0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D</li>
<li>Add a 0x80 byte in front of it for mainnet addresses or 0xef for
testnet addresses. Also add a 0x01 byte at the end if the private key
will correspond to a compressed public key</li>
<li>Perform SHA-256 hash on the extended key</li>
<li>Perform SHA-256 hash on result of SHA-256 hash</li>
<li>Take the first 4 bytes of the second SHA-256 hash, this is the checksum</li>
<li>Add the 4 checksum bytes from point 5 at the end of
the extended key from point 2</li>
<li>Convert the result from a byte string into a base58 string using
Base58Check encoding. This is the Wallet Import Format<br />
5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ</li>
</ol>
</blockquote>
<p>So if your key starts with a 5 and has about 51 characters it is already in WIF format and you don't need to do anything.</p>
<blockquote>
<p><strong>Am I expected to use the BIP38 password when converting</strong></p>
</blockquote>
<p>No.</p>
<p>To <em>extract</em> the private-key from a password-protected wallet you need to enter the wallet password.</p>
<p>To <em>convert</em> an extracted private-key you don't need any password.</p>
<p>However with wallets like Bitcoin core, the private key will be already in WIF format when you use a Bitcoin core command like <code>dumpprivkey</code> in the debug console or in the command line interface (CLI) etc. so no conversion is necessary with Bitcoin core.</p>
<blockquote>
<p><strong>are there any safe offline software I can use</strong></p>
</blockquote>
<p>The only safe software is offline software ... compiled from carefully inspected open-source code, running on a computer running a secure operating system that has no network access (no wired, wireless, bluetooth etc), has never had any sort of network access and never will have any sort of network access.</p>
<p>In reality the distinction between safe and unsafe is false, there are only degrees of relative safety.</p>

CC BY-SA 4.0
2020-08-12T10:55:32.507Z
2020-08-12T11:03:44.580Z
2020-08-12T11:03:44.580Z
RedGrittyBrick
<p>Firstly, you should never enter a Bitcoin Private Key on an online service (unless you're okay with never owning those Bitcoins again).</p>
<p>Secondly, almost all Private Keys are already in WIF format when you see them. Unless you literally generated a random large number, you probably were not given a raw PrivateKey.</p>
<p>Thirdly, If the data you have is really a PrivateKey, you should be able to import it to BitcoinCore with the <code>importprivkey</code> function. This will allow your bitcoin client to send and sign for the bitcoins you have. You do not need a BIP38 password or anything else. BIP38 Passphrases are used to generate the private key in the first place.</p>

CC BY-SA 4.0
2020-08-11T17:48:10.753Z
2020-08-11T17:48:10.753Z
Sachin Meier
<p>I have a private key for a storage bitcoin wallet (there's not much in there I'm just testing methods) but it is in private key form and to import it to my main wallet I need to convert it into WIF.</p>
<p>My 2 questions are, what does the process to convert it involve? (Ie. Am I expected to use the BIP38 password when converting or is that a sign it's a scam?) And secondly are there any safe offline software I can use or shall I try and use Linux commands?</p>
<p>EDIT:
Thanks for the replies. In the end I found this website:
<a href="https://iancoleman.io/bitcoin-key-compression/" rel="nofollow noreferrer">https://iancoleman.io/bitcoin-key-compression/</a></p>
<p>I saved the webpage and used it offline in a VM with the internet disconnected completely. Before I reconnected the internet I restored the VM to a previously saved state. The key it generated offline worked perfectly when typed into my wallet.</p>
<p>Further question: does that method sound okay regarding the information being available to the net and the fact I inserted my password into the offline page?</p>

CC BY-SA 4.0
2020-08-10T23:39:45.530Z
What "private key format" is it in? WIF is generally *the* private key format.
Ava Chow
<private-key><encryption><private-key-import><bitcoin-wallet-app><wallet-import-format>
Private key to WIF process
Piestar
# Private key to WIF process

(Asked by: username_0 on 2020-08-10)

I have a private key for a storage bitcoin wallet (there's not much in there I'm just testing methods) but it is in private key form and to import it to my main wallet I need to convert it into WIF.

My 2 questions are, what does the process to convert it involve? (Ie. Am I expected to use the BIP38 password when converting or is that a sign it's a scam?) And secondly are there any safe offline software I can use or shall I try and use Linux commands?

EDIT:
Thanks for the replies. In the end I found this website:
<https://iancoleman.io/bitcoin-key-compression/>

I saved the webpage and used it offline in a VM with the internet disconnected completely. Before I reconnected the internet I restored the VM to a previously saved state. The key it generated offline worked perfectly when typed into my wallet.

Further question: does that method sound okay regarding the information being available to the net and the fact I inserted my password into the offline page?

**Tags:** private-key, encryption, private-key-import, bitcoin-wallet-app, wallet-import-format

> **Comments:**
> **username_1**: What "private key format" is it in? WIF is generally *the* private key format.  

---

## 2 answers

### Answer by username_2 on 2020-08-12. Score: 2

> **what does the process to convert it involve?**

The process is described in [the Bitcoin Wiki page on WIF](https://en.bitcoin.it/wiki/Wallet_import_format):

> 1. Take a private key  
>    0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D
> 2. Add a 0x80 byte in front of it for mainnet addresses or 0xef for
>    testnet addresses. Also add a 0x01 byte at the end if the private key
>    will correspond to a compressed public key
> 3. Perform SHA-256 hash on the extended key
> 4. Perform SHA-256 hash on result of SHA-256 hash
> 5. Take the first 4 bytes of the second SHA-256 hash, this is the checksum
> 6. Add the 4 checksum bytes from point 5 at the end of
>    the extended key from point 2
> 7. Convert the result from a byte string into a base58 string using
>    Base58Check encoding. This is the Wallet Import Format  
>    5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ

So if your key starts with a 5 and has about 51 characters it is already in WIF format and you don't need to do anything.

> **Am I expected to use the BIP38 password when converting**

No.

To *extract* the private-key from a password-protected wallet you need to enter the wallet password.

To *convert* an extracted private-key you don't need any password.

However with wallets like Bitcoin core, the private key will be already in WIF format when you use a Bitcoin core command like `dumpprivkey` in the debug console or in the command line interface (CLI) etc. so no conversion is necessary with Bitcoin core.

> **are there any safe offline software I can use**

The only safe software is offline software ... compiled from carefully inspected open-source code, running on a computer running a secure operating system that has no network access (no wired, wireless, bluetooth etc), has never had any sort of network access and never will have any sort of network access.

In reality the distinction between safe and unsafe is false, there are only degrees of relative safety.


---

### Answer by username_3 on 2020-08-11. Score: 0

Firstly, you should never enter a Bitcoin Private Key on an online service (unless you're okay with never owning those Bitcoins again).

Secondly, almost all Private Keys are already in WIF format when you see them. Unless you literally generated a random large number, you probably were not given a raw PrivateKey.

Thirdly, If the data you have is really a PrivateKey, you should be able to import it to BitcoinCore with the `importprivkey` function. This will allow your bitcoin client to send and sign for the bitcoins you have. You do not need a BIP38 password or anything else. BIP38 Passphrases are used to generate the private key in the first place.


---

