How to use the base58 encoder decoder
- Select Encode or Decode from the Mode dropdown.
- Type or paste your plain text or Base58 string into the Input box.
- Choose Base58 (Bitcoin) for standard conversion or Base58Check to include a double SHA-256 checksum.
- The result updates instantly as you type.
How Base58 Encoding Works
Base58 converts raw bytes into a string using a 58-character alphabet: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. The algorithm treats the input bytes as a single large integer in base 256, then repeatedly divides by 58 to extract digits from least significant to most significant.
Leading zero bytes (0x00) are preserved as the character 1, which represents zero in the Base58 alphabet. For example, the ASCII string "A" is byte 65. Dividing 65 by 58 gives quotient 1 and remainder 7. Index 1 maps to 2 and index 7 maps to 8, yielding 28.
Why Certain Characters Are Excluded
The alphabet deliberately omits four characters that look similar in many fonts: 0 (zero), O (capital o), I (capital i), and l (lowercase L). Removing these prevents transcription errors when someone reads a Base58 string off a screen and types it manually. This design choice makes it ideal for cryptocurrency wallet addresses, where a single mistyped character could send funds to an unrecoverable destination.
If you need a format that uses all alphanumeric characters without exclusions, consider the base62 encoder instead.
Base58Check and Double SHA-256
Base58Check extends standard Base58 by appending a 4-byte checksum before encoding. The checksum is computed by hashing the payload twice with SHA-256 and taking the first four bytes of the second hash. When decoding, the tool splits the result back into payload and checksum, recomputes the hash, and verifies they match.
This mechanism catches typos and copy-paste errors. Bitcoin addresses use Base58Check with a version byte prefix (0x00 for mainnet P2PKH addresses, which produces the familiar leading 1). If the checksum fails during decoding, the tool returns an error rather than silently producing corrupted data. This tool treats your text as the whole payload, so it does not add a Bitcoin version byte; input is limited to 8,000 characters, and decoded bytes that are not valid UTF-8 text are shown as hex.
Common Values Reference
| Plain Text | Hex Bytes | Base58 |
|---|---|---|
| (empty) | (empty) | |
| A | 41 | 28 |
| Hello World | 48656c6c6f20576f726c64 | JxF12TrwUP45BMd |
| abc | 616263 | ZiCa |
| 0x00 | 00 | 1 |
| 0x0000 | 0000 | 11 |
Base58 vs Other Encodings
Compared to Base64, Base58 produces slightly longer output but avoids characters like +, /, and = that cause problems in URLs, filenames, and double-click selection. Base64 is better suited for embedding binary data in JSON or email attachments where URL safety is not a concern.
For shorter encodings designed specifically for QR codes and constrained environments, Base45 offers a more compact alternative. Each encoding serves a distinct purpose: Base58 prioritizes human readability and manual transcription, while others optimize for machine parsing or space efficiency.
Worked examples
| Example | Input | Result |
|---|---|---|
| Hello World | Mode: encode; Input: Hello World; Variant: base58 | Result: JxF12TrwUP45BMd |
| Decode JxF12TrwUP45BMd | Mode: decode; Input: JxF12TrwUP45BMd; Variant: base58 | Result: Hello World |
| Base58Check encode | Mode: encode; Input: test; Variant: base58check | Result: LUC1eAJa5jW |
FAQ
What is Base58 used for?
Base58 is primarily used for Bitcoin and other cryptocurrency addresses. Its alphabet avoids visually ambiguous characters, making it safer for humans to read, type, and share wallet addresses without introducing errors.
How does Base58 differ from Base64?
Base58 uses 58 characters and excludes 0, O, I, and l to prevent visual confusion. Base64 uses 64 characters including +, /, and = padding, which can break URLs or require escaping in certain contexts.
What is Base58Check?
Base58Check adds a 4-byte checksum derived from a double SHA-256 hash of the payload. This allows software to detect typos or corruption when decoding an address, preventing funds from being sent to an invalid destination.
Can I base58 encode binary files?
This tool accepts text input, which is converted to UTF-8 bytes before encoding. For arbitrary binary files, you would typically use a command-line tool or library that reads raw bytes directly rather than interpreting them as text.
Is my data sent to a server when I use this tool?
No. All encoding, decoding, and SHA-256 hashing happens locally in your browser using JavaScript code in the page. Nothing is transmitted over the network.
Why does my decoded Base58Check string show an error?
If the 4-byte checksum at the end of the decoded bytes does not match the double SHA-256 hash of the preceding payload, the tool reports a checksum mismatch. This usually means the input string contains a typo or was truncated.