How to use
- Choose Encode to build a Base58Check string, or Decode to verify one and recover its bytes.
- To encode, set the input to Hex and enter the version byte followed by the payload, for example 00 and a 20-byte HASH160.
- Keep the Base58Check option on. The checksum is appended when encoding and verified when decoding.
- To decode, paste the string and set the output to Hex. You get the version byte and payload without the checksum.
How Base58Check works
- Start with a version byte that says what the data is, followed by the payload, such as a 20-byte public key hash.
- Hash these bytes with SHA-256, hash the result with SHA-256 again, and keep the first 4 bytes as the checksum.
- Append the checksum and encode everything with Base58. Each leading
0x00byte becomes a1.
This tool computes the checksum over exactly the bytes you enter. It does not add a version byte for you, so include it at the start of your input. When decoding, it recomputes the checksum over everything except the last 4 bytes. If they match, you get the version byte and payload; if not, you get a checksum error. A random typo slips through only about once in four billion attempts.
Common version bytes
| Version byte | Data | Encoded string starts with |
|---|---|---|
0x00 | Bitcoin P2PKH address (20-byte HASH160) | 1 |
0x05 | Bitcoin P2SH address (20-byte script hash) | 3 |
0x6F | Bitcoin testnet P2PKH address | m or n |
0x80 | WIF private key (32 bytes, plus 0x01 for a compressed key) | 5, or K / L if compressed |
SegWit and Taproot addresses that start with bc1 use Bech32, not Base58Check, and cannot be decoded here. XRP Ledger addresses use the same checksum with the Ripple alphabet: pick Ripple in the Alphabet option.
Example: from HASH160 to address
The well-known address associated with the Bitcoin genesis block is version byte 00 followed by a 20-byte HASH160. Entered as Hex input with Base58Check on, it gives the familiar address:
Input (Hex) 00 62e907b15cbf27d5425399ebf6f0fb50ebb88f18
Output 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
In code, the Python base58 package provides b58encode_check() and b58decode_check(), and the npm package bs58check offers encode() and decode().
Specification
| Alphabet | 1-9 A-Z a-z without 0 O I l |
|---|---|
| Output size | About 137% plus a 4-byte checksum |
| Padding | None |
| Standard | Bitcoin Base58Check |
| Case sensitive | Yes |
Examples
| Input (UTF-8) | Output |
|---|---|
Hello, World! | gTazoqFvnegwaKM8v1B33sR |
Base64.is | 6XgW4KVJr8DBmZEAeJ |
你好 | DrMzxHL43oWHbW |
Frequently asked questions
Why does decoding fail with a checksum error?
Does the tool add the version byte for me?
00 for a Bitcoin address.Can I decode a WIF private key?
80, the 32-byte key and, for compressed keys, a trailing 01. Decoding runs locally in your browser, but treat real private keys with care anyway.Can I decode bc1 addresses?
No. Native SegWit and Taproot addresses use Bech32 or Bech32m, a different encoding with its own checksum. In Bitcoin, Base58Check is only used for legacy addresses that start with 1 or 3 (m, n or 2 on testnet).