WIF writes a single Bitcoin private key in Base58Check so it can be copied between wallets. Learn the format, the prefixes 5, K and L, and how to sweep.
A private key you can copy
Wallet Import Format encodes one private key with Base58Check:
| Starts with | Meaning |
|---|---|
| 5 | Key for an uncompressed public key |
| K or L | Key for a compressed public key |
When you'd see one
- Paper wallets from the early days.
- Importing or "sweeping" a single key into a wallet.
- Exporting a key from Bitcoin Core with older commands.
Be careful
- A WIF string is the private key. Anyone who sees it can spend.
- Prefer sweeping (sending the funds to your HD wallet) over importing, so the old key, which may have been exposed, stops mattering.
- Today, seed phrases and descriptors are the normal way to back up wallets.
Sweep vs import
| Sweep | Import | |
|---|---|---|
| What happens | Funds move to your wallet's own addresses | The old key is added to your wallet |
| Transaction needed | Yes | No |
| If the old key leaks later | Doesn't matter | Funds at risk |
Sweeping is the safer choice for any key that was printed, photographed or shared.
Share this guide
Key takeaways
- WIF encodes one private key with a version byte and checksum.
- It starts with 5 (uncompressed) or K/L (compressed).
- Sweep funds from old WIF keys into a modern wallet.
Common questions
Is a WIF key the same as a seed phrase?
No. WIF holds one key; a seed phrase generates an entire tree of keys.
Can I convert WIF to a seed phrase?
No, the seed can't be derived from a single key.
How do I import a WIF key?
Most desktop wallets have 'import' or 'sweep private key' options. Sweeping is safer.
Is a WIF key the same as a private key?
It is the private key, written in a portable format with a checksum.