# WIF private key format

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.

Canonical page: https://mybitcoinexplorer.com/learn/wif-private-key-format
Topic: Keys and addresses
Published: 2026-10-29
Updated: 2026-10-30


## A private key you can copy
Wallet Import Format encodes one [private key](https://mybitcoinexplorer.com/learn/private-keys) with [Base58Check](https://mybitcoinexplorer.com/learn/base58check):

> Diagram: The parts of a WIF private key before Base58 encoding — Version 0x80:1,Private key:32,Compressed flag 0x01:1,Checksum:4

| 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.


## 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.

## Related lessons

- [Private keys](https://mybitcoinexplorer.com/learn/private-keys)
- [Base58Check encoding](https://mybitcoinexplorer.com/learn/base58check)
- [Seed phrases (BIP 39)](https://mybitcoinexplorer.com/learn/seed-phrases-bip39)
- [How to back up a Bitcoin wallet](https://mybitcoinexplorer.com/learn/backing-up-a-wallet)
