Quiz Entry - updated: 2026.07.14
What is the Base64 character set, and how many bits of entropy does each Base64 character provide?
Base64 uses 64 characters (A-Z, a-z, 0-9, +, /) providing exactly 6 bits per character.
The Base64 alphabet:
A-Z(26 characters)a-z(26 characters)0-9(10 characters)+and/(2 characters)- Total: $26 + 26 + 10 + 2 = 64$
Entropy per character:
$$\log_2(64) = 6 \text{ bits/character}$$
Padding: The = character is used for padding (not part of the 64) when the input length isn't divisible by 3 bytes.
Common uses: Email attachments (MIME), data URIs in HTML/CSS, JSON Web Tokens (JWT), cryptographic key representation.
Comparison to hex: Base64 is 50% more space-efficient than hexadecimal (6 bits/char vs 4 bits/char). A 256-bit key needs 64 hex characters but only ~43 Base64 characters.
Go deeper:
Base64 — the full alphabet and padding rules.