How to use
- Paste the hex bytes into the input box. Spaces, colons and a 0x prefix are accepted.
- Read the Base58 result in the output.
- Copy it, or press Swap to decode Base58 back to hex.
How hex turns into Base58
The hex digits are first turned into bytes, two digits per byte, so the input needs an even number of digits. The bytes are then read as one big-endian number and rewritten in base 58 with the Bitcoin alphabet. Each leading 00 byte is written as a 1, which is why 0000ff becomes 115Q while ff on its own becomes 5Q.
Base58 needs about 1.37 characters per byte, so 64 hex digits (32 bytes) shrink to 43 or 44 characters. The alphabet has no 0, O, I, l, + or /, so the result is easy to read aloud, can be selected with a double click and fits into URLs. Everything is computed in your browser.
Building Solana and IPFS identifiers
- Solana: an address is the 32-byte Ed25519 public key in Base58, with no prefix and no checksum. Paste the 64-digit hex key to get the address.
- IPFS CIDv0: a CIDv0 is a sha2-256 multihash in Base58. Put
1220in front of the 64-digit digest and you get a 46-character string that starts withQm. The digest must be the one IPFS computed for the encoded block, which is not the same as the SHA-256 of the original file.
1220 9d6c2be50f706953479ab9df2ce3edca90b68053c00b3004b7f0accbe1e8eedf
QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG
Bitcoin addresses need a checksum
A hash160 on its own is not an address. A legacy Bitcoin address is Base58Check of the version byte 00 followed by the 20-byte hash160, which appends a 4-byte double SHA-256 checksum before encoding. Encoding 00 and the hash160 with plain Base58 gives a shorter string without a checksum, and wallets reject it.
Use the Base58Check page instead: switch the input to hex, enter 00 followed by the hash160, and the checksum is added for you. If your hex already ends with the correct checksum, this page produces the same address.
0062e907b15cbf27d5425399ebf6f0fb50ebb88f18 (Base58Check)
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Hex to Base58 in code
# Python (pip install base58)
import base58
base58.b58encode(bytes.fromhex('0000ff')) # b'115Q'
// JavaScript (npm install bs58)
import bs58 from 'bs58';
bs58.encode(Buffer.from('0000ff', 'hex')); // '115Q'
Frequently asked questions
How do I turn a hash160 into a Bitcoin address?
Why does the result start with several 1 characters?
Your hex starts with the same number of 00 bytes. Base58 keeps them as leading 1s so that they are restored when the string is decoded.
Why is my hex input rejected?
Hex needs an even number of digits and only the characters 0-9 and a-f, in upper or lower case. Spaces, colons and a 0x prefix are removed automatically; anything else, such as a stray letter g or a missing digit, is an error.