<p>To sweep private keys in Electrum, you need the associated addresses. <strong>Without the addresses, it's not possible to determine the correct format</strong> (p2pkh, p2wpkh, or p2wpkh-p2sh) for the private keys.</p>
<p>You can try using a <a href="https://iancoleman.io/bip39/" rel="nofollow noreferrer">tool</a> to generate the addresses from the private keys, but this process should be done with caution as it involves exposing your private keys to a third-party website.</p>
<p><strong>It's recommended to use a secure and offline environment to generate addresses from private keys.</strong></p>

CC BY-SA 4.0
2023-01-30T08:55:48.013Z
2023-01-30T08:55:48.013Z
Paro
<p>I'm trying to sweep private keys in Electrum but it asks to input: p2pkh:, p2wpkh: or p2wpkh-p2sh before the keys based on the address. I only have the keys but no address, how can I proceed with this safely?</p>

CC BY-SA 4.0
2023-01-29T19:41:57.563Z
What about using the same command three times on three sweeps?
Mercedes
<private-key><electrum><private-key-import>
Electrum private key sweep
Xr5500
# Electrum private key sweep

(Asked by: username_0 on 2023-01-29)

I'm trying to sweep private keys in Electrum but it asks to input: p2pkh:, p2wpkh: or p2wpkh-p2sh before the keys based on the address. I only have the keys but no address, how can I proceed with this safely?

**Tags:** private-key, electrum, private-key-import

> **Comments:**
> **username_1**: What about using the same command three times on three sweeps?  

---

## 1 answers

### Answer by username_2 on 2023-01-30. Score: 1

To sweep private keys in Electrum, you need the associated addresses. **Without the addresses, it's not possible to determine the correct format** (p2pkh, p2wpkh, or p2wpkh-p2sh) for the private keys.

You can try using a [tool](https://iancoleman.io/bip39/) to generate the addresses from the private keys, but this process should be done with caution as it involves exposing your private keys to a third-party website.

**It's recommended to use a secure and offline environment to generate addresses from private keys.**


---

