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

What if two dictionaries use different symbols?

03

Base64url changes two dictionary entries. Sender and reader must agree on the alphabet and the separate ending rule.

RFC 4648 · § 5EXAMPLE
1 / 4 · Start with binary bytes

These bytes were chosen to use the two dictionary entries that differ.

Original data pieces

Byte 18 bits
Byte 28 bits
Byte 38 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
Apply the profile

Padding behavior comes from the consuming protocol, not the alphabet name alone.

What if two dictionaries use different symbols?Base64url changes two dictionary entries. Sender and reader must agree on the alphabet and the separate ending rule.What if two dictionaries use different symbols?Alphabet indices 62 and 63-_Base64urlPadding omission requires the consuming profile

Key idea: Both sides need the same dictionary and the same ending convention. URL-friendly does not mean private or trusted.

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
  • Base64url uses - and _ instead of + and /.
  • It is distinct from standard Base64.
  • Omitting padding requires an explicit profile or an implicitly known data length as described in §5.

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

RFC 4648 §5. Standard indices 62/63 use + and /; Base64url uses - and _. They are distinct alphabets. Padding omission must follow the referring profile or the implicitly known length described by §5; this experiment explicitly chooses the containing format’s convention. Verified erratum 9030 is editorial and does not change that rule.

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 ↗