I've got some Go code that successfully generates private keys and vanity addresses as described by the wiki.

So I have all the parameters around the private key but I'm not sure what to do with that info to make it usable by the bitcoin core application.

Should I build a wallet.dat file to point the wallet software at? What's the format for that file? Is there an alternative format so I can import my new key alongside my old keys instead of replacing the existing file so that the software has more control of what the structure of the wallet.dat is?

I could layout the key in the same format that paper wallet QR codes use but I'm not sure what I'd do with that string for a desktop computer to accept it.

What format should I put the raw private key into and where should I put it for wallet software to use it?

  • That sounds perfect! The second answer calls it Wallet Import Format or WIF and that's 100% what I was after! I guess that makes this question a duplicate. EDIT: they deleted their comment, but not after linking to this question. Aug 18, 2017 at 20:07
  • My bad didnt mean to post as comment. Reposted as an answer Aug 18, 2017 at 20:09

1 Answer 1


In Core, go to "Help" and "Debug Window". Go to the console and type importprivkey [key]. This might also interest you: How do I import a private key into Bitcoin-Qt?

  • 1
    It might also be worth mentioning WIF in the answer as for what format that key needs to be in. Aug 18, 2017 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.