What is Base64?
Base64 is an encoding scheme that converts binary data into ASCII text. It's commonly used to embed images in HTML/CSS, encode data for APIs, and transmit binary data over text-based protocols.
When to Use Base64
- Embedding images directly in HTML or CSS files
- Passing binary data in JSON API payloads
- Storing binary data in text-based databases
- Email attachments (MIME encoding)
Frequently Asked Questions
Does Base64 encrypt my data?
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string. For security, use actual encryption like AES.
Why does Base64 output end with = signs?
The = signs are padding characters. Base64 works in groups of 3 bytes; when the input isn't divisible by 3, padding is added.