What if two dictionaries use different symbols?
03Base64url changes two dictionary entries. Sender and reader must agree on the alphabet and the separate ending rule.
These bytes were chosen to use the two dictionary entries that differ.
Original data pieces
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.
Padding behavior comes from the consuming protocol, not the alphabet name alone.
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.
Rules & examples
Both sides need the same dictionary and the same ending convention. URL-friendly does not mean private or trusted.
- 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
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.