FreeToGenerate.com

Runs entirely in your browser — nothing you paste is uploaded.

Direction
Alphabet
Read input as

There is no standard base58 alphabet. These two use the identical 58 characters in different orders, so the same bytes produce different text — and text encoded under one decodes silently, without any error, to the wrong bytes under the other.

The same bytes under the other alphabet

This is what makes the two conventions dangerous rather than merely different:

Encoded with the alphabet you chose
2NEpo7TZsLFA2wMeK
Encoded with the other one
p4NFofTZ1LEwpAMeK

Both strings are made only of characters that are valid in both alphabets. Nothing in either can tell you which convention produced it, so a decoder given the wrong one returns different bytes and reports no error at all.

Why 58 and not 62

Base58 leaves out four of the sixty-two letters and digits: zero, capital O, capital I and lowercase l. Those are the two pairs a person cannot reliably tell apart in most typefaces. It also has no padding character and no line breaks, because the format exists to be copied by hand, read aloud and double-clicked in one piece.

0 I O l

Also available in: Español · Português · Français · العربية

Base58 Encoder and Decoder

Encode and decode base58 under either alphabet, and see what happens when the two are confused.

What is base58?

Base58 is a way of writing binary data as text, like base64, but designed to survive being read by a human. It uses 58 characters instead of 64, and the six it drops are the reason it exists: the digit zero, capital O, capital I and lowercase l — the two pairs almost nobody can tell apart in a typical typeface — along with the plus and slash that base64 uses and that break when a string is double-clicked or put in a URL.

The result has no padding, no punctuation and no line breaks. It is one unbroken run of letters and digits you can select with a double-click, read down a phone line, or copy off a screen without wondering whether that was an I or an l. That is why Bitcoin addresses, IPFS hashes and XRP account identifiers all use it.

It is also, and this is the part most tools do not tell you, not a standard.

How to use the encoder

  1. Choose a direction and an alphabet. Encode turns bytes into base58; decode turns base58 back into bytes. The alphabet matters — see below — and Bitcoin's is the one you almost certainly want unless you are working with the XRP Ledger.
  2. Type or paste your input. When encoding you can enter plain text or hex; when decoding, paste the base58 string. Any character outside the chosen alphabet is refused, and the tool names which one it was.
  3. Look at the second panel. It shows the same bytes encoded under the other alphabet, so you can see for yourself how different the two results are.

There is no standard base58, and that is a real hazard

The closest thing to a specification is an IETF Internet-Draft, draft-msporny-base58, with intended status Informational. It expired on 2 October 2021 and was never published as an RFC. Everything else is convention, and the conventions disagree.

The two in this tool come from the source code of the projects that define them: Bitcoin Core's base58.cpp and rippled's tokens.cpp. They use the identical set of 58 characters, and they order 23 of those 58 differently. Encode “Hello, world” with Bitcoin's and you get 2NEpo7TZsLFA2wMeK; with the XRP Ledger's you get p4NFofTZ1LEwpAMeK.

That difference is more dangerous than an outright incompatibility would be. Because both alphabets contain exactly the same characters, a string produced by one is always a syntactically valid string for the other. Feed it to a decoder set to the wrong convention and you do not get an error — you get different bytes, silently. There is nothing in a base58 string that says which alphabet made it, so the format cannot help you and neither can we; you have to know.

A visible symptom is what happens to leading zeros. A zero byte at the front becomes the first character of the alphabet, which is 1 for Bitcoin and r for the XRP Ledger. So the same three bytes 00 00 01 write as 112 or as rrp, depending.

The leading-zero rule, and why implementations get it wrong

Base58 is arithmetic: treat the input as one enormous number and repeatedly divide by 58. That works perfectly except for one thing — a number does not remember its leading zeros. The bytes 00 AB and AB are the same integer, so a purely arithmetic encoder produces the same output for both, and the length of your data changes when you decode it.

The convention handles this outside the arithmetic. Each leading zero byte is counted before the division starts and re-attached afterwards as one leading alphabet-zero character. It is a rule bolted onto the maths rather than a consequence of it, which is exactly why it gets skipped.

Bitcoin Core publishes 21 test vectors for base58, and seven of them carry leading zero bytes — a proportion that looks deliberate, because an implementation that forgets the rule passes the other fourteen and looks fine. This encoder passes all 21 in both directions.

What this tool does not do

It does base58, not Base58Check. Bitcoin addresses are not raw base58: they are a version byte, the payload, and a four-byte checksum made from a double SHA-256, all encoded together. That checksum is what lets a wallet reject an address with a typo in it. Pasting a Bitcoin address here will decode it correctly to bytes, but the tool will not verify the checksum or tell you the address is valid — it is an encoder, not an address validator, and conflating the two would be the more useful-looking and less honest choice.

It also has no opinion about what your bytes mean. Base58 is a transport, so the decoded output is shown as hex, and as text only when the bytes happen to be valid UTF-8. When they are not, the tool says so rather than showing replacement characters, because a page full of question-mark diamonds implies the data was text and merely broken when usually it was never text at all.

Why is it free?

Everything happens in your browser. Nothing you paste is uploaded, logged or stored — which matters here more than on most pages, because base58 strings are often keys, addresses and identifiers.

No account, no sign-up, no limit, and no watermark on anything you copy out.