Base58Check Encoder and Decoder

Append a 4-byte double SHA-256 checksum and encode to Base58, or decode a Base58Check string, verify its checksum and read the version byte and payload.

Runs entirely in your browser. Nothing is uploaded.

How to use

  1. Choose Encode to build a Base58Check string, or Decode to verify one and recover its bytes.
  2. To encode, set the input to Hex and enter the version byte followed by the payload, for example 00 and a 20-byte HASH160.
  3. Keep the Base58Check option on. The checksum is appended when encoding and verified when decoding.
  4. To decode, paste the string and set the output to Hex. You get the version byte and payload without the checksum.

How Base58Check works

  1. Start with a version byte that says what the data is, followed by the payload, such as a 20-byte public key hash.
  2. Hash these bytes with SHA-256, hash the result with SHA-256 again, and keep the first 4 bytes as the checksum.
  3. Append the checksum and encode everything with Base58. Each leading 0x00 byte becomes a 1.

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 byteDataEncoded string starts with
0x00Bitcoin P2PKH address (20-byte HASH160)1
0x05Bitcoin P2SH address (20-byte script hash)3
0x6FBitcoin testnet P2PKH addressm or n
0x80WIF 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

Alphabet1-9 A-Z a-z without 0 O I l
Output sizeAbout 137% plus a 4-byte checksum
PaddingNone
StandardBitcoin Base58Check
Case sensitiveYes

Examples

Input (UTF-8)Output
Hello, World!gTazoqFvnegwaKM8v1B33sR
Base64.is6XgW4KVJr8DBmZEAeJ
你好DrMzxHL43oWHbW

Frequently asked questions

Why does decoding fail with a checksum error?
Either a character was mistyped, the wrong alphabet is selected, or the string is plain Base58 without a checksum. Plain Base58 strings, such as Solana addresses and IPFS CIDs, should be decoded on the Base58 page.
Does the tool add the version byte for me?
No. The checksum is calculated over the bytes you enter, so the version byte must be part of your input. Switch the input to Hex and type it first, for example 00 for a Bitcoin address.
Can I decode a WIF private key?
Yes. Paste it in the Decode tab and choose Hex output. You get 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).