Base64 Encoder / Decoder
Base64, Base32 and Base58 in both directions.
About Base64 Encoder / Decoder
A Base64 encoder and decoder that also handles Base32 and Base58, converting UTF-8 text in either direction as you type, entirely in your browser.
How to use
- Choose Base64, Base32 or Base58 and the direction, Encode or Decode.
- Type or paste into the left pane. The result appears on the right as you type, with a Copy button.
- If the input is not valid for the chosen alphabet, an error explains which characters are allowed.
Formats
| Encoding | Alphabet | Padding | Size of 12 bytes |
|---|---|---|---|
| Base64 | A–Z a–z 0–9 + / (RFC 4648) |
= to a multiple of 4 |
16 characters |
| Base32 | A–Z 2–7 (RFC 4648) |
= to a multiple of 8 |
24 characters |
| Base58 | Bitcoin alphabet, no 0 O I l |
none | 17 characters |
- Text is encoded as UTF-8, so non-ASCII characters are handled. Decoding fails with a clear message if the bytes are not valid UTF-8.
- Base64 decoding accepts the URL-safe alphabet (
-and_), missing padding and line breaks. - Base32 decoding is case-insensitive, ignores missing padding, and rejects lengths that cannot form whole bytes.
- Base58 input is limited to 64 KB, because base conversion is quadratic.
- Not supported: data URLs, or encoding files and images.
Example
Hello, world
→ Base64 SGVsbG8sIHdvcmxk
→ Base32 JBSWY3DPFQQHO33SNRSA====
→ Base58 2NEpo7TZsLFA2wMeK
Privacy
Conversion runs in the page with btoa, atob and plain arithmetic. No request is made, and nothing is stored.
Frequently asked questions
- Why is Base64 output about 33% larger than the input?
- Base64 represents every 3 bytes (24 bits) as 4 characters of 6 bits each, so output length is 4/3 of the input, rounded up to a multiple of 4 with = padding. 12 bytes become 16 characters.
- Is Base64 encryption?
- No. Base64 is a reversible encoding with no key; anyone can decode it instantly. It exists to carry binary data through text-only channels such as email, JSON and URLs, not to hide it.
- What is the difference between Base64, Base32 and Base58?
- They differ in alphabet size and purpose. Base64 is the most compact and used in email and JWTs; Base32 uses only A–Z and 2–7 so it survives case-insensitive systems and is used in TOTP secrets; Base58 drops 0, O, I and l to avoid misreading and is used for Bitcoin addresses.
- Why does decoding say the input is not valid Base64?
- The input contains characters outside A–Z, a–z, 0–9, + and / (or the URL-safe - and _), or its length is impossible for Base64. Missing = padding is added for you. A different message, about UTF-8, means the Base64 was valid but the bytes are not text.