Electrum wallet logo Import a Private Key into Bitcoin-QT app

Step by step:

  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 > Console
  3. Unlock your wallet.
    If wallet is not locked just skip this step.
    If your wallet is encrypted you must unlock it by entering
    walletpassphrase "YourLongPassphrase" 600

  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)

How to import private key into Bitcoin-QT wallet application

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.