Base58 to Base64 Converter
Convert between Base58 and Base64 encodings instantly. Decode Base58 (Bitcoin) to raw bytes and re-encode to Base64, or reverse. Free online tool.
About
Base58 encoding, introduced by Satoshi Nakamoto for Bitcoin addresses, deliberately omits visually ambiguous characters (0, O, I, l) from its 58-character alphabet. This prevents transcription errors in cryptocurrency wallets and check-based systems but makes the encoding incompatible with standard Base64 tooling. A mismatched decode - feeding Base58 into a Base64 decoder - silently produces corrupt byte streams, which can mean lost funds or broken cryptographic verification. This tool performs the intermediate step correctly: it decodes your input to raw bytes using arbitrary-precision integer arithmetic, then re-encodes to the target format with proper leading-zero preservation.
Base64 (RFC 4648) uses a 64-character alphabet plus = padding and is the standard for embedding binary data in JSON, email (MIME), and data URIs. The conversion is lossless in both directions provided the source string is valid. This tool validates every character against the respective alphabet before processing and reports the exact position of any illegal character. Note: this converts the encoding, not the semantics - a Base58Check string with a checksum byte will have that checksum preserved in the Base64 output, but it will not be independently verified here.
Formulas
Base58 decoding converts a string of length n over alphabet A58 into an integer, then into a byte array. The integer value is computed as:
where di is the index of the i-th character in the Base58 alphabet (range 0 - 57). Leading 1 characters (index 0) represent leading zero bytes and are counted separately, then prepended as 0x00 bytes to the result.
The integer V is converted to bytes via repeated division:
Base64 encoding groups the resulting byte array into 3-byte (24-bit) blocks, each split into 4 groups of 6 bits, mapped to the Base64 alphabet. If the final block has fewer than 3 bytes, = padding is appended:
where di = index of character in alphabet, V = decoded integer value, bj = j-th byte (big-endian), n = input string length, k = number of output bytes minus 1.
Reference Data
| Property | Base58 | Base64 |
|---|---|---|
| Alphabet Size | 58 characters | 64 characters + padding |
| Characters Used | 1-9 A-H J-N P-Z a-k m-z | A-Z a-z 0-9 + / = |
| Excluded Characters | 0, O, I, l | None (all printable ASCII used) |
| Padding | None | = (1 or 2 trailing) |
| Leading Zero Bytes | Encoded as leading 1s | Encoded naturally in bit stream |
| Efficiency (bits/char) | β 5.86 | 6.00 |
| Size Overhead vs Raw | β 137% | β 133% |
| Checksum (Check variant) | Last 4 bytes (Base58Check) | Not defined by format |
| Primary Use | Bitcoin/crypto addresses, IPFS CIDs | MIME email, Data URIs, JSON payloads |
| Case Sensitive | Yes | Yes |
| URL Safe | Yes (no + or /) | No (+ and / need escaping) |
| Human Readable | High (no ambiguous chars) | Moderate |
| Inventor / Origin | Satoshi Nakamoto, 2009 | RFC 4648, 2006 (MIME since 1996) |
| Encoding Process | BigInt division by 58 | 6-bit grouping of octets |
| Alphabet Order | Numeric β Uppercase β Lowercase (minus exclusions) | Uppercase β Lowercase β Digits β +/ |
| Max Address Length (BTC) | 34 characters (P2PKH) | N/A |
| Decode Complexity | O(n2) naive, O(n log n) optimized | O(n) |
Frequently Asked Questions
A-Za-z0-9+/= is rejected, and padding placement is checked for correctness.