Skip to content
uencoder
TUTORIAL

Base64 vs Base32 vs Base58

Compare three popular base-encoding schemes and learn when to choose each one.

Problem

You need to pick the right base-encoding scheme for your use case but are unsure how Base64, Base32, and Base58 differ.

Prerequisites

  • General understanding of positional numeral systems
  • Awareness of character-set constraints in target systems

Steps

  1. 1. Compare the alphabets

    Base64 uses 64 characters including + and /. Base32 uses 32 characters (A-Z, 2-7) and is case-insensitive. Base58 uses 58 characters, deliberately omitting 0, O, I, and l to avoid human-readability confusion.

    Input
    same input: 0x4d
    Output
    Base64: TQ== | Base32: MY====== | Base58: n
  2. 2. Evaluate the trade-offs

    Base64 is the most compact but uses characters that need URL encoding. Base32 is longer but safe for case-insensitive systems and filenames. Base58 avoids ambiguous characters, making it ideal for user-facing codes like Bitcoin addresses.

    Input
    compactness: Base64 > Base58 > Base32
    Output
    human-readability: Base58 > Base32 > Base64
  3. 3. Choose based on context

    Use Base64 for data transport in JSON or MIME. Use Base32 for filenames or case-insensitive systems. Use Base58 for short links, payment addresses, or any code humans must transcribe.

    Input
    URL payload
    Output
    choose Base64url or Base58

Expected result

A clear rationale for which encoding to use based on compactness, human readability, and character-set safety.

Common errors

Using Base64 in a URL without URL-encoding + and /
Switch to Base64url (replace + with -, / with _) or use Base58 to avoid URL-unsafe characters entirely.

Troubleshooting

  • If users mistype codes, switch from Base64 to Base58 to eliminate ambiguous characters.
  • If a system is case-insensitive, use Base32 instead of Base64.

Security limits

  • None of these encodings provide confidentiality. They are reversible by design.

Related tools

Related glossary

Related tasks

Ready to run it?

References