Base58 Encoding: The Human-Friendly Hex
Base58 Encoding: The Human-Friendly Hex
In the early days of Bitcoin, Satoshi Nakamoto realized that raw hexadecimal strings (0-9, a-f) were too long and difficult for humans to handle. However, standard Base64 was too dangerous for a financial system. The solution was Base58.
1. The Compactness of Base58
Hexadecimal uses a "Base 16" system. Base58 uses 58 distinct characters.
-
Hex:
0079be667ef9dcbbac55a06295ce870b07029bfc(40 chars) -
Base58:
1C6v4K9H1Y3X2W5Z7Y8X9Y0A(much shorter)
By using a larger alphabet, we can represent the same amount of information in fewer characters, making it easier to print on paper or send via text message.
2. Why not Base64?
Standard Base64 (64 characters) includes symbols like +, /, and =, which can break URL formatting or look confusing in different fonts. More importantly, Base64 includes characters that look identical to one another, which is a disaster for a "Copy-Paste" economy.
3. The Design Goal
Base58 was designed with three specific goals:
-
No Ambiguity: Characters that look alike were surgically removed.
-
No Punctuation: Only alphanumeric characters are used, ensuring it won't be "Linkified" or broken by email clients.
-
Double-Click Friendly: Most software treats a Base58 string as a "single word," allowing users to double-click to select the entire address easily.
4. Legacy Identity
Base58 is the foundation of "Legacy" Bitcoin. If you see an address starting with a 1 or a 3, you are looking at a Base58 encoded string. While modern SegWit addresses use Bech32, Base58 remains the most widely recognized format in the history of cryptocurrency.
| Characteristic | Hexadecimal | Base64 | Base58 |
|---|---|---|---|
| Characters | 16 | 64 | 58 |
| Safe for Humans | Low | Low | High |
| Compactness | Low | High | Medium-High |
| URL Safe | Yes | No | Yes |
In the next section, we will look at the Excluded Characters in the Base58 alphabet.
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: