Skip to content
Putting It All Together
step 1/5

Reading — step 1 of 5

Read

~1 min readVariants

Putting It All Together

You've built every layer:

LayerLesson
Why base641
Alphabet2
Encode 3-to-43
Padding4
Decode 4-to-35
Errors6
Base64URL7

Beyond:

  • Base85 (Ascii85): 4 bytes → 5 chars (vs 3 → 4 in base64). Smaller. Used in PDF and Git binary patches.
  • Base91 / yEnc: even smaller for binary-in-text. Niche.
  • Hex: simpler but 2x overhead instead of 1.33x.
  • Base32 / Base32-Crockford: case-insensitive variants for human-typeable data.
  • MIME quoted-printable: efficient for mostly-ASCII data with occasional binary.

When NOT to use base64:

  • Files for which native binary works (HTTP body, gRPC)
  • Storage (33% bigger)
  • Hot loops (encoding overhead)

Where you've seen it:

  • Email attachments (MIME)
  • Data URIs (data:image/...;base64,)
  • HTTP Basic auth
  • JWT
  • PEM-encoded keys/certificates
  • TOTP secrets (Base32)

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…