How can small data pieces travel as ordinary text?
01Use a shared symbol dictionary to turn data into text, then reverse the process. It is a change of wrapper, not a secret code.
These chosen ASCII letters occupy one byte each.
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.
Those indices encode as TWFu.
Key idea: Encoding changes how data is written. It does not make data secret or prove who sent it.
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
Encoding changes how data is written. It does not make data secret or prove who sent it.
- Base64 uses A–Z, a–z, 0–9, +, and /.
- Padding completes a final partial quantum when required.
- Encoding does not provide encryption or integrity.
Examples are illustrative. Consult the linked RFC and its errata for implementation details.
RFC 4648 §4. Input is explicitly ASCII bytes 43 41 54. Six-bit indices 16, 52, 5, 20 map to Q0FU. Base64 has 64 data symbols; = is a separate padding marker. The 24 input bits become four symbols; decoding recovers the original bytes.
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.
This revision adds the Base32 extended-hex alphabet and test vectors, among other clarifications.
Read the updated RFC section ↗