How to use the Base58 tool
- Set Direction to Encode or Decode.
- Set Bytes from to Text (UTF-8) for words, or Hex for binary data such as hashes and keys.
- Paste your input. In Hex mode, write bytes like
00 00 28 7for0000287f. - Copy the result. When decoding with Hex selected, the output is the bytes as hex.
What it does and when to use it
Base58 was introduced with Bitcoin to write addresses and keys in a form people can copy without mistakes. It is now used well beyond crypto: in IPFS content IDs, in some database and URL short IDs, and in other blockchains such as Solana for public keys.
Use this tool to turn a hex value into its Base58 form, to look at the bytes behind a Base58 string, or to test your own encoder against known results. It is an encoding, not encryption: anyone can decode Base58.
For a similar idea without the leading-zero rule and with all 62 letters and digits, see Base62. Base32 is case-insensitive and better for reading aloud, while Base64URL is shorter and standard in web tokens.
How it works
Base58 does not cut the data into fixed bit groups like Base64. Instead:
- The input bytes are read as one large unsigned number, most significant byte first.
- The number is divided by 58 again and again. Each remainder picks one character from
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. - The characters are written in reverse order, so the most significant digit comes first.
- One
1is added at the front for each zero byte at the start of the input.
Decoding multiplies back up by 58 for each character. Because every character affects the whole number, the output length is not a fixed ratio of the input; it is roughly 1.37 characters per byte. The work happens in your browser.
Worked examples
Hello World! → 2NEpo7TZRRrLZSi2U
00 00 28 7f b4 cd (Hex) → 11233QC4
11233QC4 (Decode, Hex) → 00 00 28 7f b4 cd
0OIl (Decode) → “0” at position 1 is not a Base58 character.
Any other encoder that uses the Bitcoin alphabet gives the same strings, so these make handy checks for your own code. The 11 at the front of the second result comes from those zero bytes. The last line shows the error for characters the alphabet leaves out.
Limits and tips
- Base58 has no built-in error detection. A typo gives different bytes, not an error, unless it uses a missing character.
- There are other Base58 alphabets, such as Ripple’s and Flickr’s. This tool uses the Bitcoin alphabet only.
- Spaces in a Base58 string are ignored when decoding.
Frequently asked questions
Why does Base58 leave out some characters?
Does this check Bitcoin address checksums?
Why do zero bytes turn into 1s?
When should I set "Bytes from" to Hex?
Is there a size limit?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.