What is Base64?
Base64 represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). Every 3 bytes of input becomes 4 output characters. Useful for embedding binary in text-only formats like JSON, CSS, or email.
Common uses
- Data URIs:
src="data:image/png;base64,..."embed images in CSS/HTML - JWT tokens: header and payload are Base64-encoded
- Email attachments: MIME encodes binary as Base64
- API keys in config: safely transmit binary