Take the 2-minute tour ×
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

How do I import a private key into Bitcoin-Qt? bitcoind is nowhere to be found, and pywallet says it requires "bsddb" when I run it, which is also nowhere to be found. I generated some vanity addresses and I want to use them.

share|improve this question
add comment

1 Answer

up vote 12 down vote accepted
  1. Run Bitcoin-QT
  2. Select Help (to the right of Settings)
  3. Select Debug Window
  4. Select Console
  5. If you encrypted your wallet, unlock it by entering walletpassphrase "YourLongPassphrase" 600 next to the > input box
  6. Next to the > input box type importprivkey <bitcoinprivkey>

Example: importprivkey 5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS

share|improve this answer
Thanks! I had to do it twice, though. The first time it didn't show up and the second time it said error code -4 and it worked. Whatever works! –  lurf jurv Dec 31 '12 at 5:23
This might also be of help: bitcoin.stackexchange.com/a/13303/6375 –  Scott Feb 21 at 0:32
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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