J-Kit
Português

difference base32 base64

Base32 vs Base64 — when to use each

Base32 and Base64 are two of the most widely used binary encoding schemes, but with distinct characteristics that make them suitable for different contexts. Understanding the differences avoids wrong choices that can create compatibility problems.

Technical comparison

  • Base32: 32 chars (A-Z, 2-7), ~60% overhead, case-insensitive, no 0/O/l/1. Better for: human UIs, DNS, 2FA. Base64: 64 chars (A-Z, a-z, 0-9, +, /), ~33% overhead, case-sensitive. Better for: HTTP headers, JSON, compact binary data storage.

Same data, two formats

"Hello" in Base32

Input
Hello
Expected output
JBSWY3DP

8 chars for 5 bytes (60% overhead).

"Hello" in Base64

Input
Hello
Expected output
SGVsbG8=

8 chars for 5 bytes (60% overhead — coincidence for 5 bytes).

Full tool FAQ

Base64 uses 64 characters (A-Z, a-z, 0-9, +, /) and is more compact (~33% overhead vs ~60% for Base32). Base32 uses only 32 unambiguous uppercase characters (no l/1, 0/O confusion), making it better suited for human typing, case-insensitive systems and contexts that restrict the character set.

Frequently asked questions

Which to use for authentication tokens in cookies?

Base64url (the URL-safe variant of Base64, with - and _ instead of + and /) is the standard for JWT and session tokens. Base32 can be used in tokens that need to be typed or spoken by humans, but is less common in that context.

Does this page replace official or professional review?

No. It helps explain the scenario and use the tool more safely, but real decisions should consider official sources, full context and qualified guidance when needed.