BITCOIN MAINNETLive explorer status
OWNERSHIP

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.

A private key you can copy

Wallet Import Format encodes one private key with Base58Check:

The parts of a WIF private key before Base58 encodingVersion 0x801 BPrivate key32 BCompressed flag 0x011 BChecksum4 B
The parts of a WIF private key before Base58 encoding
Starts withMeaning
5Key for an uncompressed public key
K or LKey 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

SweepImport
What happensFunds move to your wallet's own addressesThe old key is added to your wallet
Transaction neededYesNo
If the old key leaks laterDoesn't matterFunds at risk

Sweeping is the safer choice for any key that was printed, photographed or shared.

Share this guide
Share on X ↗

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.