Skip to content
ZeroServer.tools

Base58 Encoder / Decoder

Encode or decode Base58 (Bitcoin alphabet) strings.

Mode
Base58 Output

About Base58 encoding

Base58 is a binary-to-text encoding popularized by Bitcoin. It uses 58 characters — the alphanumerics minus the easily-confused 0, O, I, and l — so values are safer to copy by hand. Unlike Base64 it has no padding and treats the input as one big number, preserving leading zero bytes as 1s. All encoding runs locally with native BigInt math.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Decoding a Bitcoin address or key to inspect its version byte and checksum rather than trusting how it looks.
  • Producing an identifier meant to be copied by hand, where 0/O and l/I confusion is the failure you are designing out.
  • Checking whether an address was transcribed correctly by seeing whether it decodes at all.
  • Encoding a short binary value for a URL or a QR code without needing percent-encoding.
  • Comparing two addresses that differ only in a character people routinely misread.

Frequently Asked Questions

Why 58 characters?
Base64's alphabet minus the four most confusable characters — 0, O, I and l — plus the non-alphanumeric + and /. Satoshi Nakamoto chose it for Bitcoin addresses specifically so they could be transcribed by hand without ambiguity.
What is Base58Check?
Base58 with a version byte prefixed and a 4-byte checksum appended — the first four bytes of SHA-256(SHA-256(payload)). It means a mistyped Bitcoin address is rejected rather than sending funds into the void.
Why is encoding slower than Base64?
Because 58 is not a power of two, so there is no bit-aligned mapping. The whole input must be treated as one big integer and repeatedly divided — genuinely O(n²) work, unlike Base64's simple bit regrouping.
Why do Bitcoin addresses start with 1 or 3?
The version byte. 0x00 encodes to a leading 1 (a legacy P2PKH address) and 0x05 to a leading 3 (P2SH). Leading zero bytes are represented as literal 1 characters, which is why the prefix is stable.
Is it used outside cryptocurrency?
Some — IPFS content identifiers historically used it, and Flickr short URLs did too. But most non-crypto uses have moved to Base64URL, which is faster and standardised, since machine-readable strings do not need transcription safety.
Why does the output length vary for the same input size?
Because 58 is not a power of two, so encoding is arbitrary-precision division rather than a fixed bit grouping. The result depends on the value, not just the length — which is also why leading zero bytes need special handling.
How are leading zero bytes preserved?
They are encoded separately, one `1` character each, because numerically a leading zero contributes nothing and would vanish. That is why Bitcoin addresses starting with 1 have a zero version byte.
Is Base58 standardised?
Not formally — it is defined by its implementations, and alphabets differ. Bitcoin's ordering is the de-facto standard, but Ripple uses a different one, so a string valid in one system decodes to different bytes in the other.

Common errors and gotchas

  • Assuming a fixed output length. This is arithmetic on the whole value rather than a per-block mapping, so length varies with the leading bytes.
  • Forgetting that leading zero bytes are encoded separately as `1` characters, and dropping them changes the value.
  • Mistaking Base58 for Base58Check. The latter appends a checksum, and validating an address requires it.
  • Expecting speed. Encoding needs repeated big-integer division, which is why it is far slower than Base64 on large inputs.
  • Typing a `0`, `O`, `I` or `l`. None exist in the alphabet, so their presence means a transcription error somewhere.

Related Encoders & Decoders tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate