Base58 Encode Online: Bitcoin Base58 and Base58Check
Encode text or a file as Bitcoin Base58 in your browser, or add a Base58Check checksum. Decoding verifies the checksum and names the first bad character. Nothing is uploaded.
0 characters, 0 bytes
0 characters, 0 bytes
About the Base58 encoder
This page encodes text or a file as Base58, the Bitcoin alphabet, and can add a Base58Check checksum. It decodes both back as well. Base58 uses the digits and letters that are hard to confuse: 0, capital O, capital I and lower-case l are left out, and there are no symbols, so a value can be double-clicked to select it and copied by hand. Everything runs in your browser: your text and files never leave your device, and nothing is uploaded.
How to encode Base58
Steps
- Type or paste text, or press Choose file. Text is encoded as UTF-8.
- Read the Base58 in the output and press Copy.
- Select Base58Check to append a four-byte checksum, as Bitcoin addresses do.
- Select Decode to turn Base58 back into text. If the bytes are not text, download them or turn on Show result as hex.
How Base58 works
One large number
Unlike Base64 or Base32, Base58 does not work in fixed groups. The whole input is read as one big-endian number and rewritten in base 58. Each leading zero byte is kept as a leading 1, so 00 00 00 encodes to 111. The byte 61, the letter a, encodes to 2g.
Base58Check
Base58Check adds the first four bytes of SHA-256 applied twice to the payload before encoding. When decoding, the checksum is recomputed and compared, so a single mistyped character is detected instead of producing a different, valid-looking value. The version byte 00 followed by the hash 010966776006953D5567439E5E39F86A0D273BEE encodes to the address 16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM.
Size limit
Converting a whole number between bases takes time that grows with the square of its length. Base58 is meant for keys, hashes and addresses, so this page handles up to 16 KB and says so beyond that. For larger data, use hex, Base32 or the Base64 Encoder.
Decoding and errors
The decoder ignores spaces and line breaks but not letter case, because a and A are different Base58 digits. A character outside the alphabet, such as a zero, is named with its position. Note that this page decodes the raw bytes; it does not check which network or address type a version byte stands for.
To sign data with the same curve Bitcoin uses, try the ECDSA tool. To compute the double SHA-256 on its own, use the double SHA-256 hash page. The full Base32, Base58 and hex encoder covers the other encodings.
Open-source credits
- The Base58 and Base58Check codecs are written for this site and follow the Bitcoin Base58Check encoding. The tests assert the vectors in Bitcoin Core's
base58_encode_decode.jsonand the address example from the Bitcoin wiki. - The SHA-256 checksum is computed by @noble/hashes by Paul Miller, MIT licence.