What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is widely used in computing to encode data when transferring through systems that only support text, such as email, HTTP headers, or JSON APIs.
Common Uses
- Embedding images in HTML/CSS as data URIs
- Encoding API keys in HTTP Authorization headers
- Storing binary data in JSON or XML
- Email attachments (MIME encoding)
- JWT (JSON Web Token) payload encoding
Frequently Asked Questions
Is Base64 encryption? ▼
No. Base64 is encoding, not encryption. Anyone can decode it without a key. Never use Base64 to secure sensitive data.
Why does Base64 end with == ? ▼
Base64 encodes 3 bytes into 4 characters. If input length is not divisible by 3, = padding is added to reach a multiple of 4.
What is URL-safe Base64? ▼
URL-safe Base64 replaces + with - and / with _ so it can be safely used in URL query parameters without percent-encoding.