What Is Base64 Encoding?
Base64 is a encoding scheme that converts binary data into ASCII text format. Learn how it works and when to use it.
Understanding Base64 Encoding
Base64 represents binary data in an ASCII string format by translating it into a radix-64 representation. It's commonly used when encoding binary data that needs to be stored and transferred over media that are designed to deal with text.
When to Use Base64
- Embedding images in HTML or CSS
- Transmitting binary data over JSON APIs
- Encoding email attachments (MIME)
- Storing binary data in text-based formats like XML or JSON
How It Works
The text "Hello" becomes "SGVsbG8=" in Base64. The "=" at the end is padding.