Characters are not bytes · bytes are not symbols
Start with the octets.
Base64 never sees “emoji” or “CJK.” It sees bytes, groups their bits by six, and maps those values to printable ASCII. Text interpretation happens on either side of that encoding core.
Characters
A · 码 · 🔧What a person reads
UTF-8 bytes
41 · E7 A0 81 · F0 9F 94 A7What enters Base64
6-bit groups
010000 011110 011110 …Four groups per 24 input bits
Symbols
Qeegg…Printable transport text
Two RFC alphabets
Only two symbols change. The protocol still changes.
Shared 62 symbols · A–Z · a–z · 0–9+-Plus can be special in URLs/forms
/_Slash is a path separator
=Often omittedThe surrounding protocol decides
Base64base64urlDo not call them interchangeable without conversion
Padding workbench
The final quantum determines the equals signs.
4 symbolsno padding3 symbols + =one pad2 symbols + ==two padsCanonical encoders set unused pad bits to zero. Missing padding may be allowed by a protocol, but impossible length remainder 1 is still invalid.
Decode triage
Successful Base64 decoding only gives bytes.
UTF-8 text
48 65 6C 6C 6FDecode with a fatal UTF-8 decoder
Binary data
00 FF A3 10 …Show bytes; never invent replacement glyphs
Known signature
89 50 4E 47 …Candidate PNG; validate the real format
Data URL
data:image/png;base64,…Prefix supplies media context; it is not encoded payload
Strictness incident strip
Reject ambiguity with a specific reason.
# in inputNon-alphabet character
QUI===Too much or misplaced padding
QU JDWhitespace in strict mode
a+b/cStandard alphabet inside Base64URL mode
AImpossible length · remainder 1
non-zero pad bitsDecodable but non-canonical
BASE64 IS NOT ENCRYPTION
Representation supplies neither secrecy nor integrity.
Anyone can decode the bytes.
Data can be modified and re-encoded.
Base64 adds roughly one output byte per three input bytes before wrappers.