Base64 Encoding
Base64 encodes binary data into an ASCII string using 64 characters (A-Z, a-z, 0-9, +, /). It increases size by about 33% but ensures safe transmission over text-based protocols.
Every 3 bytes of input become 4 Base64 characters
Padding character '=' is used when input length isn't a multiple of 3
Common Uses
- Email attachments (MIME encoding)
- Embedding images in HTML/CSS (data URIs)
- API authentication tokens
- Encoding binary data in JSON