What Is Base64? Encoding Principles and Common Uses Explained
Base64 is an encoding you see everywhere on the web: email attachments, JWTs, and Data URI images all rely on it. It doesn't encrypt — it converts arbitrary bytes into text made of 64 safe characters, so it can travel through text-only protocols.
What Base64 actually does
Base64 splits every 3 bytes (24 bits) into 4 groups of 6 bits, mapped to 64 characters: A–Z, a–z, 0–9, plus + and / (with = padding when short). Binary data thus becomes pure ASCII text that safely fits inside JSON, URLs, or email headers.
Common use cases
- Inline small icons in HTML/CSS (Data URI) to cut requests
- Encode credentials in JWT and Basic auth
- Encode binary content in email attachments (MIME)
- Carry binary data with special characters in APIs
Try it online
When you need to encode or decode, just use FreeToolset's Base64 tool — pure browser runtime, UTF-8 for Chinese supported, no upload required.
💡 Base64 is NOT encryption! It only encodes; anyone can decode it. Encrypt sensitive data before Base64 transport.