Encoding
Base64 encoding uses 64 characters (A-Z, a-z, 0-9, +, /) to represent binary data.
Why it's needed
- Email systems and HTTP headers expect text, not raw binary.
- Prevents data corruption when binary is sent through text channels.
- Enables embedding images in HTML/CSS (data URIs).
Common uses
- Encoding credentials in HTTP Basic Authentication.
- Embedding images in emails or JSON.
- Encoding JWT tokens for API authentication.
- Storing binary data in JSON or XML.