Visual RFC.
ALL RFCs / RFC 4648
Read the RFC ↗
RFC 4648 / MECHANISM GUIDE

Why are there dictionaries with 16, 32 or 64 symbols?

04

Smaller dictionaries give each text symbol fewer bit places. The same data then needs a different number of symbols.

RFC 4648 · § 6EXAMPLE
1 / 4 · Keep the input data fixed

These letters stand for explicitly chosen ASCII byte values.

Original data pieces

Byte 1f8 bits
Byte 2o8 bits

Each tiny place is a bit: filled = on, empty = off.

What happens if you change this?

Make one change, then watch again. Restart restores the original example.

3 / 3
03
Compare Base32

A different five-bit grouping needs its own alphabet and final-group rules.

Why are there dictionaries with 16, 32 or 64 symbols?Smaller dictionaries give each text symbol fewer bit places. The same data then needs a different number of symbols.Why are there dictionaries with 16, 32 or 64 symbols?Byte FF = 1111 11111111111100Base32 uses five-bit groups and its own rulesThe final group needs zero pad bits

Key idea: The dictionary size changes the number of bits named by each symbol, not the bytes we started with.

Terms
Base encoding
A reversible way to represent bytes with a selected alphabet of text symbols. It is not encryption.
Alphabet
The agreed dictionary of symbols. Base64 and Base64url use different alphabets.
Byte / bit
One byte contains eight on-or-off values called bits.
Padding / pad bits
Equals-sign ending marks / zero filling bits inside the final data symbol. They are different things.
Profile
The containing format’s explicit extra rules, such as whether padding is omitted.
Canonical form
A specified consistent spelling. Being decodable does not guarantee that spelling.

Look up a term in the glossary ↗

Rules & examples
  • Base32 maps five-bit groups to 32 symbols.
  • Base32hex uses the extended-hex alphabet of §7.
  • Base16 maps each four-bit nibble to a hexadecimal character and needs no padding.

Examples are illustrative. Consult the linked RFC and its errata for implementation details.

RFC 4648 §§6–8. Base32 alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ234567; Base32hex 0123456789ABCDEFGHIJKLMNOPQRSTUV; Base16 0123456789ABCDEF. Input 66 6F; output MZXQ====. 4 zero filling bits and 4 padding characters. Base16 maps nibbles and has no padding. This encoder writes uppercase; Base32 and Base16 readers here accept ASCII letter-case variants. Reported errata 4889/8669 are not verified replacements for the normative encoding rules; the implementation is checked against the RFC vectors and independent codecs.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

Start with this guide; no earlier guide is needed for the overview.

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 4648

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗