How to import keys to bitcoind (Bitcoin QT)?

Gothic forget keys. How to import keys to Bitcoin QT.

For those of you looking to import your Vanity address, hacked key or paper wallet into your Bitcoin QT client, here are the instructions:

  1. Backup Your Wallet. Although this process is well tested and used you should always take another backup of your wallet.dat file before starting.
  2. Then select Debug Window -> ConsoleBitcoin QT debug window console (bitcoin core)
  3. Unlock your wallet. If your wallet is encrypted you must unlock it. Unlock it by entering walletpassphrase "YourLongPassphrase" 600next to the > input box. If wallet is not locked just skip this step.
  4. Next to the > input box type importprivkey <bitcoinprivkey> 'OptionalLabel' (Note that the private key must not have spaces, remove them if they are included in your backup)

Example: importprivkey 5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS

The label may have spaces, the quotes are only needed if you want a space in the label.

On a fast PC it takes 2 minutes to import, and during this time it looks like you application has hung. You are now done.

While adding multiple keys you may want to avoid a time consuming rescan after each key. To do so use the command importprivkey <bitcoinprivkey> '' false for each key and importprivkey <bitcoinprivkey> '' true for the last one. The blank label is needed to pass the true/false flag.