TeachMeBitcoin

WIF Prefixes: 5, K, and L

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

WIF Prefixes: 5, K, and L

By looking at the first character of a WIF key, a seasoned Bitcoin user can immediately tell whether the key is for a legacy uncompressed address or a modern compressed address.

1. The Prefix "5" (Legacy)

If a WIF key starts with the number 5, it is an Uncompressed Private Key.

2. The Prefixes "K" and "L" (Modern)

If a WIF key starts with K or L, it is a Compressed Private Key.

3. Why two letters (K and L)?

Because the private key is 32 bytes (256 bits), the total range of possible numbers is very large.

4. Why this matters

If you import a 5... key into a wallet, the wallet will look for funds at the uncompressed address. If you import a K... key, it will look at the compressed address.

First Char Compression Added Byte Public Key Size
5 None None 65 Bytes
K Compressed 0x01 33 Bytes
L Compressed 0x01 33 Bytes

In the next section, we will explore the Compression Flag Quirk.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!