Importing your private keys into Electrum

Import or Sweep

Before you import your private keys consider whether sweeping them might be better.

Importing your private keys requires you to create a new electrum wallet just for your private keys

Sweeping them means that all the funds in the private keys are sent to your existing deterministic Electrum wallet. This is a one-time on-chain operation.

Unless you expect to receive money in the future to the addresses corresponding to your private keys it is better to sweep them. Sweeping private keys sends the funds to your deterministic wallet and backing that up is as easy as writing down the seed mnemonic.

However if importing is what you want to do then read on for the guide

Importing private keys into Electrum

These instructions are for Electrum 3.0 and later. Please upgrade first if you are using an older version of electrum.

You cannot import private keys into an existing HD wallet. Importing private keys requires you to create a new wallet file that will only contain the imported private keys.

  1. Start new electrum wallet file by following this short guide. Then come back here and proceed to step 2.
  2. Click on next to see the wallet type selection window:

    As you can see Electrum supports different types of wallets. Just select “Import bitcoin addresses or private keys”.
  3. And then you paste in your private keys in the box that it displays on the next screen:

    Enter one private key per line. Electrum supports mini private keys and full sized keys in Wallet Import Format (WIF).

    Note: if the addresses in the source wallet begin with 3 you have to prepend “p2wpkh-p2sh:” to each private key before importing it. If the addresses begin with bc1 then you prepend “p2wpkh:”. Click on the info button to see examples.

  4. Electrum will then display your wallet window:

    That’s it. You’re done!

If you need help with your Electrum problems see the support forum links here.

50 thoughts on “Importing your private keys into Electrum”

    1. What version of electrum are you using? The version is listed up top in the electrum window title bar.

      Does the private key begin with 5, K or L?

        1. I gave you instructions to follow on IRC but you ignored them and disappeared. There is a bug in blockchain.info where it gives out compressed private keys for old addresses instead of the correct uncompressed private key. So what you can do is load bitaddress.org in your browser, go offfline, enter your private key on the wallet details tab and then grab the uncompressed private key from there. The uncompressed private key starts with 5. Then close your browser before you go online again. After that you can import your uncompressed private key into electrum to get the correct address.

          Note that entering your private key on a website is risky so you should just send the money from your blockchain.info wallet to your electrum wallet instead.

  1. Hello my keys are beginning with 5 or K, the recover process has somewhat succeeded, but I get balance 0 and transactions recovered only till 2015
    all my later transactions are not recovered, nor my actual balance

    thank you

    1. You could try switching to a different server: https://bitcoinelectrum.com/how-to-switch-to-a-different-electrum-server/

      However it is also possible that your coins are in a different address controlled by a different private key. Perhaps whatever wallet software you were using would have had multiple private keys and it moved the coins to a different address like a change address. You haven’t specified where you got the private key from so I can only speculate.

      1. Hello

        I exported successfully ALL my private keys from https://bitcoin.org/fr/wallets/mobile/android/bitcoinwallet
        this wallet has full correct history, All keys have been restored fine, but the imported history stops at 2015. I will try to change server. all keys are beginning with 5, K or L

  2. Most likely your bitcoins are in a change address like I said before. What you need to do is extract the seed words and restore using that in Electrum. For more info about that follow this guide (it’ll work for the schildbach wallet too): https://bitcoinelectrum.com/restoring-your-multibithd-wallet-in-electrum/

  3. Hi, here my strange situation:
    – i have a blockchain web wallet whit actually balance 0.36 btc
    – i also have in my transaction history a unconfirmed send transaction of 0.13 from 4 dec (yes 30 days unconfirmed)
    – following webs warning i get a Electrum Wallet 3.0.3
    – i create a new wallet and import my private key (i have only 1 key start L4…)
    – after syncro i see a balance of 0.28 (didint match whit imported wallet) and all transaction history end at 19 december and also i didint see the unconfirmed transaction
    so why this missmatch balance? why is reported only at 19 dec? and why i dont see the unconfirmed transaction?
    Thanks

    1. The remaining coins are probably in a change address. That’s why you don’t import private keys unless you really know what you are doing.

      Do you have the recovery phrase for your bc.i wallet? If yes then restore using that as per this guide: https://bitcoinelectrum.com/restoring-your-standard-wallet-from-seed/ . If you have an old bc.i wallet that does not come with a seed mnemonic/recovery phrase then see if you can find the other addresses in the wallet and their private keys and import those into electrum. However when it comes to old bc.i wallets it is best to just send the money to a new standard electrum wallet i.e. an on-chain transaction.

      1. Thanks for reply, the true is that was my mistake im an idiot ahaha because bc.i have “my wallet” and “imported address” so i only move to electrum the imported address. now i transferred from my wallet to import wallet and now electrum show me the right balance .

  4. i have last question, because bc.i show me the balance of 0.36 btc due the long unconfirmed tx of 0.13 btc (in blocktrail this tx result as cancelled and refunded to my wallet but not in blockchain where result as unconfirmed)
    But Electrum wallet show balance of 0.49 (0.36+0.13)
    This mean that i can used all 0.49 btc whit Electrum?

    1. Bitcoin doesn’t stop you from spending unconfirmed coins. However the child transaction will not confirm until the parent transaction has confirmed too. You can try various things to get the unconfirmed transaction to confirm: https://bitcoinelectrum.com/frequently-asked-questions/#my-bitcoin-transaction-is-not-confirming-what-can-i-do

      1. But on Electrum wallet is not unconfirmed, in fact this transaction not exist and btc back to wallet.
        Only in blockchain.info result this transaction still unconfirmed

        1. Electrum’s view of the blockchain comes from the server it is connected to. That server has obviously dropped your transaction. However other nodes may still remember this transaction of yours. You can try spending these coins. If enough nodes have forgotten your old transaction the new one will be relayed successfully.

          TLDR; don’t worry about it. the coins are yours.

  5. Hello,

    I am logged in to my Electrum desktop wallet, but no longer have access to my 2FA or seed. is there any way I can still get the coins out of the wallet or restore the wallet back to normal functionality? Right now I can’t seem to do anything because I don’t have the 2FA anymore.

  6. Need real help.
    In December, was create a new Electrum wallet (already used it several times before), saved 12 seed words with a QR code by print screan, did two factor authentication (it is a big problem now), send BTC there, left for a couple of months .
    Decided to pull out, enter the address of the departure – asks 2FA. I lost my phone, I do not have it. Okay, I think, it does not matter. Restore without 2FA on Seed.
    Restore – 0 Balance. Cold sweat. What the hell … there is a saved wallet.dat. Restore – everything is ok. Can see a balance and wallet……And so on a circle …
    In Total:
    – there is BTC in Electrum. There is access to it. I can watch, see, but I can not get them out, since I have lost 2fa
    – There are 12 seed phrases – but it is restored with 0 balance and with other addresses (I tried it in different ways, including QR code). By the way, I tried to restore the wallet by QR on blockchain.info – the seed is not actually written. At the same time, I can not double-check – it is not available in Electrum
    – there is a file wallet.dat – I can restore it on my device on any device, but what’s the point) to look at the balance?
    – there is access to the keys, both private and public, but the same crap – writes that there are no such, also not valid
    – I tried to register something through the console but wrote that it was a mistake. SyntaxError: invalid syntax
    – The only success, I was able to add the address (not the purse, namely the one on which btc lies in the address column Electrum) to blockchain.info and now I can look at my balance in the view mode. In order to translate btc from blockchain.info – requests a private key (I insert the one with the qr code via the right key on the address btc in the electrum) – also not valid.
    In general, straight some trouble.
    I see, I look, I can climb magic, but I can not get it out. Straight sheet
    Thank you in advance. Please help me!!!

    1. It’s look like the seed you wrote down is not for the wallet in question but for a different wallet. Nevertheless I suggest you update to the latest version of electrum 3.0.5, restore again using this version and then go look at the suggestions here: https://bitcoinelectrum.com/frequently-asked-questions/#why-does-restoring-my-wallet-from-seed-lead-to-a-different-wallet

      If non of the above steps fixes your problem you should contact trustedcoin the co-signing company and ask them for help resetting your 2fa. Their site is at trustedcoin.com

  7. I just installed and started using electrum, didnt read instructions and somehow ended up with a watchonly address, transferred funds to that address.. but now how can i use the bitcoins in this address? Can someone help?

  8. Hello

    I triple checked everything, my btc address/wallet never changed, I exported keys from schildbach wallet with the given procedure, the import works fine but won’t recover my full history and actual balance.
    It should import at least my actual balance but only imports old records with zero balance

    1. I’ve answered your question above on the 1st. You need to restore using your seed words. See here: https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/#comment-318

  9. Great guide and support from Abdussamad! I am attempting to claim my BCH from a QT wallet I used to have in 2013, but am unable to send the coins from Electrum Cash.

    The steps I have taken so far:
    1. Found my BTC addresses and private keys using bitcoin QT with commands ‘listaddressgroupings’ and ‘dumpprivkey’ for each. This has provided my with keys starting with L or K.

    2. Downloaded Electrum Cash for Mac and setup a wallet using the Address+Private Key import option (rather than Standard Wallet). Also setup a password.

    3. Entered my private keys – 1 per line

    —At this point, Electrum Cash froze up on a server not found dialog box, so I quit (not force quit). The History page was blank and the status was ‘Synchronizing’—

    4. Because I didn’t install to my Mac applications, this time I installed it, then opened it. It found my default wallet and asked for the passphrase, which was accepted.

    —This time a history was populated, but with LOTS of ‘unknown’ dates, amounts, and balances. —

    5. Tried sending the max balance (which is much less than expected) but I’m asked for a password. I use the password i set that worked to start the application, but is NOT ACCEPTED at this stage.

    Not sure what to do.. Im thinking of uninstalling and trying again, but using the Sweep feature instead next time.

    Any thoughts?

    1. This site is for electrum not electron cash. However the solution to your problem is simple. Simply follow the 1st step of the guide above to create a new wallet file and then repeat the private key import process again in that wallet file. If that doesn’t work then ask for help in the electron cash git repo at github.com/fyookball/electrum/issues/ . Like I said this site is not for bitcoin cash wallets.

      1. Thanks!

        Yeah I realised soon after posting (and mini heart attack) that I was mixing the 2 up…

        Cheers for the pointers!

  10. Can you export the private key from the existing wallet to the new wallet on the same laptop? Or do they have to be on different laptops?

    1. It can be on the same machine. But you may want to restore using your seed words instead. That way you get all the private keys in your wallet.

      See here for restoring via seed: https://bitcoinelectrum.com/restoring-your-standard-wallet-from-seed/

  11. I do have a lot of difficulty trying to use Electrum on a laptop, with an un-encrypted wallet. Of course the reason I’m having so much trouble is because I’m learning Electrum and keys and addresses and transactions and fees and sweep and import and, oh yea, the Blockchain. Why am I doing this? Because I started knowing nothing except that I had just under 2 BTC stolen from an Exodus wallet last October. I keep following it around and “borrowing” its current address, then manually editing it into the wallet file. I get my money back, I even get the xpriv for the address and import it or edit it in. It still won’t let me transmit my BTC because I don’t have a matching password for the private key. Oh well, I keep banging around as if i knew what I were doing. I figure, since he has to pay the fee every time he takes it back to another address, at least I may be irritating him, her, whoever.
    I don’t have a question, I just really wanted to say what a remarkable job you are doing here. You also have the patience of a saint. It’s comforting to know folks like you are around. Oh well, back to frustrating reading. Take care!

    1. xpriv is the extended private key which leads to a whole tree of address-specific private keys. Like all private keys it is a secret and would not be found on the public blockchain. Also if you have the xpriv you don’t need to enter any password. You can restore a wallet using the xpriv and get access to all the bitcoins controlled by it. This guide is for watch-only wallets but it works for restoring via xpriv too: https://bitcoinelectrum.com/creating-a-watch-only-wallet/ (the wallet you create by restoring via xpriv will not be watch-only).

      However it’s unlikely that a thief would have left the coins under your control. He would have moved them to address under his control i.e. an address whose private key only he knows.

      You can’t get back the coins if all you have are the addresses. Addresses are public info and bitcoin wouldn’t be very secure if you could move coins using public info.

  12. I have Electrum ZCL wallet. I open a new wallet that is standard. I then transfer some ZCL from Eleos wallet to Eelectrum using private keys since I did not have the seeds. Wallet opened fine with all the ZCL from Eleos but wallet say imported. I tried to transfer to main wallet which say standard. When I send to main wallet address, it stuck on “signing transaction”. Then it failed and I get this error message”transaction was rejected by network rules”. Why can’t I transfer from “imported” wallet to a standard wallet?

    1. This site is only for bitcoin electrum. However in your case I suggest opening your standard electrum wallet and then using the sweep functionality to sweep your Eleos private keys:

      https://bitcoinelectrum.com/sweeping-your-private-keys-into-electrum/

      If that doesn’t work then I suggest asking the zcl electrum developers for help.

  13. Hello, I just imported my segwit paper wallet private key which starts with L5 into Electrum 3.1.0, my segwit address starts with an 3, but the software displays an different address beginning with 1M. Is it possible to use imported segwit wallet for receiving and sending funds with this version? I used https://segwitaddress.org to generate the wallet.

    1. I recommend creating a p2sh segwit wallet instead:

      https://bitcoinelectrum.com/creating-a-p2sh-segwit-wallet-with-electrum/

      Alternatively if you must import this specific private key prepend: “p2wpkh-p2sh:” to the private key before importing it. For example:

      p2wpkh-p2sh:L1YSFoGhhK3K3yCu8JaVXaQzFpJzwuKRVe8aQRUHaMsN4mAheaJW

  14. Hello Thomas,

    I have two bitcoin addresses with private keys (year 2013).
    I want to create cold storage with Electrum-3.1.3 (as no HD wallet).

    1) watch-only wallet: I will create it according to your guide above on the online computer, using “Import bitcoin addresses”

    2) cold-full wallet: I create it according to your manual above on the offline computer, using “Import bitcoin private keys”

    3) according to your manual on address
    http://docs.electrum.org/en/latest/coldstorage.html#
    (this manual is not at https://bitcoinelectrum.com ???)
    I will create an online unsigned transaction,
    then I will sign this transaction offline
    and then I will send it online.

    Right?

    And what about change addresses?

    Electrum wallet (no HD) creates them?
    And the private key of change address is in watch only wallet? Or where?
    And do I need to paste this change address (change private key) into the offline electrum wallet?
    Or does wallet not create a change address?
    Or otherwise?

    Thank you for answer.

    1. This site is not by ThomasV and it is not the official electrum documentation. That is at docs.electrum.org. This site is my effort.

      First of all what you are trying to do will work. You can do offline signing with imported private keys like that.

      Regarding change, in the case of wallets with imported private keys change is sent back to one of the addresses where the inputs to the transaction were sent. So change goes back to the imported private keys. Obviously this is not very good for your privacy so I recommend creating an HD wallet instead.

  15. Wow, Abdussamad, nice speed :).

    Okey, it gives sense to me: new change address is not created in this case.
    On one my adress is 0.1 btc, so I will go experimate. Thank you, have nice day.

    (P.S. Regarding your recommendation, of course, this is only my first step. I want to migrate into trezor/electrum. In 2013 I had armory, but cold storage has Win7, online comp crashed, and new armory upgrade needs Win10 …).

  16. Hi, Abdussamad,

    can I for signing of transaction on my offline computer use version of electrum: 2.5 (from year 2015)?
    And to create unsigned transaction on my online computer by last version 3.1.3 ?

    (on my offline computer is missing some dll file for 3.1.3 … it is from 2013)

    1. The only way to know for sure is to try it. But do keep in mind that old versions have bugs that have been fixed in newer versions. There have been bug fixes related to offline signing since 2.5.

      1. Bugs – I understand.

        But signing a transaction is a basic action. This action is definitely without any error from the first version. Right?

        Step 1. On online computer last version 3.1.3 prepares unsigned transaction. It will be OK. Right?
        Step 2. On the offline computer the old version 2.6 signs transaction.
        Step 3. Last version 3.1.3 sends transaction from online computer.

        Nothing else.

        This is a procedure of urgency. I do not have any other cold storage and in windows from 2013 is missing some dll for run electrum 3.1.3
        Can you ask Thomas? Or have you his email, twitter?
        Thank you.

        1. See for community help forums: https://bitcoinelectrum.com/frequently-asked-questions/#my-question-is-not-answered-here-where-can-i-get-help

      2. Thanks.

        Now I know, that version 2.9.3 (2017-08-10) is working on my offline computer.
        Of course, I read about found vulnerability in electrum before version 3.0.5.
        (I read released notes for every version from 2.9.3 to last version 3.1.3)

        So, now I have 3 solution.

        1) to work with 3.1.3 without cold storage only on my online computer

        2) to work with 2.9.3 on online comp and also on offline comp

        3) To work with 2.9.3 on offline comp (wallet with privkeys for signing) and with 3.1.3 on online comp (watch only)

        What is better?
        Thanks. Alex.

  17. how come electrum doesn’t accept all keys entered. for instance, importing a lot of keys from my old various wallets, it created a wallet.tmp file and a wallet.dat file and the number of addys and txns differ in both. is there a client which wont sit there and not sync fully, when I look up the txns on blockexplorer they say confirmed but in the software it gives me not verified. IS there a size limitation on the dat file used? .. ive had it say 57K new txns for 2.5btc and then totally disappeared.. so im at a loss on how to check that its importing all my addresses.. are the earlier versions more reliable?

    1. It doesn’t create .dat files anymore. .tmp files shouldn’t be there either. Always use the latest version because it has bugs fixed that older versions don’t.

      Are you importing private keys created in a blockchain.info wallet?

Leave a Reply

Your email address will not be published. Required fields are marked *