# Base58Check encoding

Base58Check writes data using 58 easy-to-read characters plus a 4-byte checksum that catches typos. Learn how legacy addresses and WIF keys are built.

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


## Why 58 characters?
Satoshi took the 62 letters and digits and removed four that look alike: **0** (zero), **O** (capital o), **I** (capital i) and **l** (lowercase L). What's left is 58 characters that are hard to misread.

## The steps
> Diagram: Building a Base58Check address — Version byte: 00 = P2PKH → + payload: 20-byte hash → *Checksum: first 4 bytes of HASH256 → Base58: encode it all

1. Start with a **version byte** (00 for P2PKH, 05 for P2SH, 80 for private keys in [WIF](https://mybitcoinexplorer.com/learn/wif-private-key-format)).
1. Add the payload, for example a 20-byte [HASH160](https://mybitcoinexplorer.com/learn/hash160-and-ripemd160).
1. Compute [HASH256](https://mybitcoinexplorer.com/learn/sha-256) of that and append its first 4 bytes as a **checksum**.
1. Convert the whole thing to base 58. Each leading `00` byte becomes a leading `1`.

## Why the checksum matters
Mistype one character and the checksum won't match, so a wallet refuses to send. The chance that a random typo passes is about 1 in 4 billion.

> Newer addresses use [Bech32](https://mybitcoinexplorer.com/learn/bech32-and-bech32m), which detects errors even better and is easier to read aloud.


## The alphabet
~~~
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
~~~
Notice what's missing: 0, O, I and l.

## Version bytes and prefixes
| Version byte | Starts with | Used for |
|---|---|---|
| 0x00 | 1 | P2PKH addresses |
| 0x05 | 3 | P2SH addresses |
| 0x80 | 5, K or L | WIF private keys |
| 0x0488B21E | xpub | Extended public keys |


## Key takeaways

- Base58 removes look-alike characters 0, O, I and l.
- A version byte sets the type; a 4-byte checksum catches typos.
- Leading zero bytes become leading 1s, which is why P2PKH addresses start with 1.

## Common questions

### Why do legacy addresses start with 1?

Their version byte is 00, and each leading zero byte encodes as the character 1.

### Is Base58 still used?

For legacy and P2SH addresses, WIF keys and extended keys (xpub, xprv).

### Are Base58 addresses case sensitive?

Yes. Changing the case of a letter changes the address and breaks the checksum.

### Why didn't Satoshi use Base64?

Base64 includes look-alike characters and symbols like + and / that break when double-clicking or in URLs.

## Related lessons

- [Bech32 and Bech32m](https://mybitcoinexplorer.com/learn/bech32-and-bech32m)
- [Pay to public key hash (P2PKH)](https://mybitcoinexplorer.com/learn/p2pkh)
- [WIF private key format](https://mybitcoinexplorer.com/learn/wif-private-key-format)
- [Extended public keys (xpub)](https://mybitcoinexplorer.com/learn/extended-public-keys-xpub)
