Base58 Encode and Decode
ED-18Paste text or hex bytes to get Base58, or paste Base58 to get the bytes back. It uses the Bitcoin alphabet and can add or check a Base58Check checksum.
Runs in your browser. Nothing is uploaded.
Text, hex bytes or Base58
Result
How to use it
- Paste your text, hex bytes or Base58 into the input box.
- For encoding, choose whether the input is text (read as UTF-8) or hex bytes. For decoding, choose whether to show text or hex.
- Click Encode or Decode. Use the Base58Check buttons when the string carries a 4 byte checksum.
- Copy the result, or download it as a .txt file.
The alphabet and leading zeros
Base58 uses 58 characters: 1 to 9, A to Z and a to z, with 0, O, I and l left out because they are easy to confuse. This tool uses the Bitcoin ordering of that alphabet. Every leading zero byte in the input becomes a leading 1 in the output, and every leading 1 decodes back to a zero byte, so 00 00 61 round trips exactly. Spaces in the Base58 text are ignored when decoding.
What Base58Check adds
Base58Check appends four bytes to the data before encoding. Those bytes are the first four bytes of the SHA-256 hash of the SHA-256 hash of the data. When you decode, the tool recomputes them and tells you if they do not match, which usually means a mistyped character. It then shows the first byte as the version and the rest as hex. It does not know what any particular version byte means, so it does not label addresses by network or type.
What is not included
Only the Bitcoin alphabet is supported. Other Base58 orderings, such as those used by Flickr or Ripple, would give different text for the same bytes and are not offered. Input is turned into bytes before encoding, so text is read as UTF-8. Very long input works but gets slower as it grows, because Base58 treats the whole input as one large number.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Invalid Base58 character | The text contains a character that is not in the Base58 alphabet, such as 0, O, I or l. | Check the position in the message and correct that character. |
The checksum does not match | The last four bytes do not equal the double SHA-256 checksum of the rest. | Look for a mistyped or missing character, or use Decode instead if the string has no checksum. |
Too short for Base58Check | The string decodes to fewer than 5 bytes, so it cannot hold a payload and a checksum. | Use plain Decode, or check that the whole string was copied. |
Questions people ask
How do I encode text to Base58?
Paste the text, leave Encode input as Text (UTF-8), and click Encode. The tool turns the text into UTF-8 bytes and writes them with the Bitcoin alphabet. Choose Hex bytes instead if you want to encode raw bytes such as 48 65 6c 6c 6f.
What is the difference between Base58 and Base64?
Base64 uses 64 characters including + and /, and ends with = padding. Base58 uses 58 characters, drops the look-alike ones (0, O, I, l) and has no symbols or padding. The result is a little longer than Base64 for the same bytes, but easier to read aloud and select by double click.
Why do leading zero bytes become 1s?
Base58 turns the bytes into one big number, and leading zeros would vanish from a number. To keep them, each leading zero byte is written as the first character of the alphabet, which is 1. Decoding reverses this, so the byte count is kept.
How do I check a Base58Check address?
Paste it and click Decode Base58Check. If the four byte checksum matches, you see Checksum: valid, the version byte and the payload in hex. If it does not match, you get an error. A valid checksum does not prove the address belongs to anyone.
Does it support the Flickr or Ripple alphabet?
No. Only the Bitcoin alphabet is included, so strings made with another ordering of the same 58 characters will decode to different bytes here. Check which alphabet your system uses before comparing results.
Is my data uploaded?
No. The conversion runs in your browser, and the SHA-256 for Base58Check uses the Web Crypto API of the browser. Nothing is sent anywhere, and no sign-up is needed.
About this tool
Uses the Bitcoin alphabet (123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz), which leaves out 0, O, I and l. Text is turned into UTF-8 bytes first, or read as hex bytes if you choose that. Each leading zero byte becomes a 1, as in Bitcoin addresses, and leading 1s decode back to zero bytes. Base58Check adds a 4 byte checksum (the start of a double SHA-256 hash) before encoding and checks it when decoding; the first byte is shown as the version, and the tool does not interpret any specific address format or network. Other alphabets, such as the Flickr or Ripple ones, are not included. Spaces in the Base58 text are ignored.