Sweeping your private keys into Electrum

Sweeping your private keys means to send all the bitcoins that can be unlocked by those private keys to an address in your existing deterministic Electrum wallet. It is a one-time on-chain operation that will cost you transaction fees.

To sweep your private keys you go to Wallet menu > Private keys > Sweep:

Then you enter your private keys one per line:

The address displayed in the window above by default will be an address in your wallet. This is where all the funds will be sent.

Your private keys need to be in Wallet Import Format (WIF) or mini private key format. These are standard formats for private keys. More about that here.

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

Click on sweep and electrum will look up what bitcoins have been sent to the corresponding address. It’ll then display a window where you set the fee and enter the wallet password if any. After you’ve set a suitable fee click on send and the coins will be swept to the address you set in the previous step.

42 thoughts on “Sweeping your private keys into Electrum”

  1. What does it mean when it says the sweep is “unconfirmed”? Does this mean I have to wait a bit for it to go through? My coin appears in my new Electrum wallet but it’s also still showing up in the old multibit wallet too.

    1. It means your transaction hasn’t been incorporated in the blockchain yet. That happens within 10 minutes to an hour so it should have happened by now.

  2. Hi I am trying to extract BCH and BTG from a QT wallet on OSX
    My plan is to use Coinomi to sweep the QT private key using their Chrome extension after having imported my BTC to Electrum

    So far:
    * Downloaded verified and installed Electrum 3.0.3
    Now what? Do I sweep the private key from QT to Electrum and if I do is that like sending myself BTC? It seems to cost 19mBTC or almost 350USD??? That cannot be right. It cost 15 USD or so to send one to a normal online broker…

    1. Yes you sweep your keys. If the transaction size is large then there will be high fees. Generally speaking fees are very high these days. More about how fees are calculated here: https://bitcoinelectrum.com/how-to-manually-set-transaction-fees/

      You can always low ball the fee and bump it later if the transaction doesn’t confirm in a timely manner. More info bumping the fee here: https://bitcoinelectrum.com/frequently-asked-questions/#my-bitcoin-transaction-is-not-confirming-what-can-i-do

  3. Hi, i’m trying to sweep a Pandacoin paper wallet I was given into Electrum, but the sweep button is greyed out.

    Can i use Electrum for Pandacoins? if not, is there another wallet you would recommend for this?

  4. Hi!

    Thank you for these very good info pages! Keep up the good work!

    I have some BTC in “behind physical coin” (bought from Denarium) so I have a my private key on physical hologram paper. My idea is to get those BTCs to my Electrum Wallet.

    Problem is that when I try to “File -> New/restore -> wallet name and OK -> standard wallet and Next -> Use public or private keys and OK -> .. The “Next”-button does not activate even if I put the correct private key. It is 30 digit long, and I do not know what “xprv/yprv/zprv” means – I have just put the 30 digit private key there. So that is my showstopper 🙂 Any help?

    OR instead of above – can I just use this “Sweeping” -option? I’ll get my BTCs to Electrum via that way also?

    Thank you very much for help!

    1. You are making a mistake in one of the steps when importing your private key. They moved around some of the UI elements in 3.0. See the article about it here: https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/

      Regarding sweeping that’s an option too. Sweeping means the coins are sent to an address in your electrum wallet. It is an on-chain operation that has transaction fees associated with it. The advantage of sweeping over importing is that the private keys that control the coins changes to the ones behind the destination address you specify in the sweep window which, by default, is an address in your electrum wallet. This makes backups easier since you can easily back up an electrum wallet by just writing down its seed words. It is actually possible to sweep to any address so if you intend to send the coins to an exchange you can use the sweep option to send to the exchange’s address in one fell sweep 🙂

  5. I made a huge f*!k up. The BTC address wasnt visible anymore after a JAXX update. The 12 word phrase didn’t work either. So I tried to upload the funds with my address and privatekey at Electrum. I used the function sweep privatekey and filled in the required fields (I thought) and pushed BROADCAST. DAMN IT what an high fee! And now the most stupid action. I filled the same address as where I was sending from. So $450 gone with a useless action (0.55 -0.045 fee!!) I was sick of it! Its in my wallet now.. I am just a moron lol. first mistake and the last one i hope.

  6. I have a realy weird Private Key Encrypted and i don`t know how to use.
    It looks like this:FsdvSCsdcvjkNMFUE76DSFhfhu87STYD6T7fbfuHUY7hjnf++FFJKdFKjvckJKFjkdFDhjfsdhFfdsF97S7D9FSDfFvcFdfX/YvffGBDvfl= (this is not the real key).
    Can someone help me.

    Jord

    1. that looks like something that is base64 encoded. where did you get it? I suggest you seek help on one of the community forums: electrum.org/#community.

    1. create a new wallet https://bitcoinelectrum.com/creating-an-electrum-wallet/ and then sweep https://bitcoinelectrum.com/sweeping-your-private-keys-into-electrum/

  7. in attempting to sweep a priv. key into an existing wallet I get the following error: invalid prefix (0) for WIT key (1). The key starts with a 1 and if I use it to make a watching wallet I see an amount. This used to work. Any ideas? I tried various prefixes but I think they are for older keys–they don’t help.

    1. What you have there is an address not a private key. A private key looks like the following:

      https://en.bitcoin.it/wiki/Private_key#Base58_Wallet_Import_format

  8. I have problem with LTC on print from bitcoin ATM. I try to sweep the to my electrum ltc wallet, but I keep getting error: no inputs found. (Note that inputs need to be confirmed). Already contacted with atm company and they said they can see funds and everything is good from their side. I can also see funds on this address in LTC block. What’s the problem?

    1. note i only know about bitcoin electrum so this may be way off but i would suggest you click on ‘info’ on the sweep window. most likely you need to prepend the script type to the private key. if this doesn’t do it ask in reddit.com/r/litecoin.

  9. I am trying to transfer my bitcoins from wallet 1 to wallet 2 by using sweep (lost seed, cannot transfer to other wallet due to missing 2fa code generator). From wallet 1, the private key is generated from an address (starts with 3) with bitcoins. Electrum gives private key in format p2sh:PRIVATE KEY

    In wallet 2, after clicking to wallet –> Private keys –> Sweep, private key from wallet 1 is pasted in following format: p2wpkh-p2sh:PRIVATE KEY

    Then I get the “No inputs found.” error. Same error I get when pasting only private key, without the script type. No idea what is wrong – please help!

    I am using Electrum 4.0.9. on a Mac Catalina, new wallet is using legacy 2fa

    edit: when trying to do the sweep with key in format p2sh:PRIVATE KEY, I get I error: Exception(‘unexpected txin_type sweep: p2sh’)

    1. no you have to do a restore from seed and choose to disable 2fa when asked. see this guide

      https://bitcoinelectrum.com/restoring-your-standard-wallet-from-seed/

    2. Mark – Did you have any luck doing this? I am in a similar situation at the moment (Have Private Keys, PW, and Access to Wallet, but don’t have seed or the original 2FA Device)…

      Looking for ways to resolve this

      1. you have only one private key when you need 2 out of 3 behind each address. i suggest you contact trusted coin for help with resetting your 2fa.

  10. Is there anyway to sweep an old wallet and avoid dust? I only want my original coins and not what others sent.

    1. you can do an imported private key wallet and then use coin control to only spend specific outputs:

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

      https://bitcoinelectrum.com/how-to-spend-specific-utxos-in-electrum/

  11. Hmmm,

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

    Is this still necessary? And if so where is the info button to see examples?

  12. I am having similar problem as Mark. Trying to sweep old private key in Electrum and get message “No input found”. My prive key starts with L35. Do I need to prepend it with something?

  13. I ve tried to sweep a private key – and already destroyed the paper (don’t ask :-()

    Now I m getting the Error

    “mempool min fee not met”

    Is there a possibility to change the fee?

    1. do it again this time paying attention to what you see on your screen. a window with the option to set a fee appears right after you click on sweep in the sweep window. you can choose eta or mempool from the list next to the fee slider and this will set a market appropriate fee for you.

  14. Hey, im trying to claim my bitcoincash from an old electrum wallet btc multisig wallet. I exported my private Keys and i try to do it by sweeping on electron. So what i understand is, that i have to copypaste my private key from the old btc adress (where the bitcoincash coins are still) into the sweep window. The problem is:
    i cannot click the “sweep” button. i tryed it with the public key, with a 12 words seed, with the phrase “2p2wpkh-p2sh:” before my private key, but its still unclickable. What i am doing wrong ? My old btc adress starts with a “3”.

    1. a multisig wallet is not a p2wpkh-p2sh wallet. it’s a p2sh wallet and your best bet is to simply open the electrum wallet file using electron cash. in electrum you can backup the wallet file to your desktop via file > save backup and in electron cash open it via file > open.

  15. Hi! I have a paperwallet with a legacy address (starts with 1), made using bitcoinpaperwallet (bitaddress). At that time I also encripted the wallet with a passphrase (in theory, if you want to spend, you must have that passphrase). Now I have a Trezor One, so I want to sweep the coins from that address to a new one in the hardware wallet.
    To do that I tried to use Electrum: Standard wallet > Hardware device > PIN + Passphrase > native segwit, Encrypt wallet file.
    Wallet > Private Keys > Sweep: Write my private key (start with 6) in one line and press enter. Sweep button still grey. Append “p2pkh:” and still grey. I am sure the private key is written correctly. Any help? Or may be there is another secure way to do so… suggestions are very welcome. Thank you!

    1. you have to decrypt the private key using the wallet details tab of bitaddress.org. this will give you two private keys compressed and uncompressed with two different addresses. import/sweep the private key corresponding to the address which has unspent coins.

      also i sure hope you meant bitaddress.org and not bitcoinpaperwallet dot com. the latter turned out to be a scam operation.

  16. Hey guys,
    I could use some help. I’ve stumbled upon (on an old computer) an written document with my private keys and addresses for a Electrum wallet I used back in 2018. I did lose the seed, though…

    I’ve tried accessing my account through various ways (results in bold)

    Import private keys –> Electrum crashes
    creating a new wallet, aborting as soon as I have my new seed and change the keystore type (to BIP32), derivatino path (m/49’/0’/0′) and script type (to p2wpkh-p2sh) –> unable to sweep private keys (see 3 and 4)
    sweeping private keys with prepend ‘p2wpkh-p2sh:’ –> Sweep-button disabled
    sweeping private keys without prepend –> Error: ‘Exception(‘unexpected txin_type to sweep: p2sh’)’
    What I am able to do is to create an read-only wallet with my address and view my balance (which is still there, fortunately).

    I really don’t know what else to do, so if there’s anyone out there who is willing and able to help out, I’d truly appreciate it.
    Thanks!

    1. i suggest making a thread on bitcoin talk or /r/electrum subreddit and posting the link here. this way we can have a proper back and forth.

  17. Hi there, am trying to sweep my bitcoin on electrum and “sweep” botton remain blank, kindly advice what i use do..

    1. it could be that you pasted in something other than a private key or the private key’s checksum does not validate

      private key must be in one of the supported formats. either WIF or mini private key format. you can see what WIF looks like here: https://en.bitcoin.it/wiki/Private_key#Base58_Wallet_Import_format

      if the private key is in the correct format then make sure you didn’t miss any characters in it. Copy paste it again and leave no trailing or leading spaces or new lines.

Leave a Reply

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