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

Padding and pad bits

02

A short final group uses zero pad bits and, unless specified otherwise, equals-sign padding.

Related RFCs and changes

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

DIAGRAM§ 3.2 ↗
RFC 4648 · § 3.2EXAMPLE
3 / 3
Padding and pad bitsA short final group uses zero pad bits and, unless specified otherwise, equals-sign padding.Padding and pad bitsM = 01001101TQ==Zero pad bits complete the second groupTQ== decodes to one byte
03
Complete the quantum

TQ== represents the original one byte.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
KEY POINT

Encoders must include padding unless the referring specification explicitly says otherwise.

  • Encoders must include padding unless the referring specification explicitly says otherwise.
  • Unused pad bits must be zero for canonical encoding.
  • A decoder may reject nonzero pad bits according to its profile.
DETAILS

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

Read the RFC section ↗

Diagrams simplify the RFC. Read the linked sections for complete requirements.

Privacy
All chapters in this RFC
  1. Base64 bit groups
  2. Padding and pad bits
  3. Base64url alphabet
  4. Base32 and Base16
  5. Strictness and canonical form

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 ↗