What is Base64?
Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format. The name comes from the 64 characters used in the encoding: A-Z (26), a-z (26), 0-9 (10), and two additional characters (typically + and /).
Base64 was originally designed for email attachments (MIME) but is now widely used in web development for embedding images in CSS, encoding API authentication tokens, and transmitting binary data through JSON APIs.
How to Use This Tool
- Paste your text or Base64 string into the input area
- Click “Encode” to convert text to Base64, or “Decode” to convert Base64 back to text
- Copy the result using the Copy button
The tool automatically detects whether your input looks like Base64 and suggests the appropriate action.
Common Base64 Use Cases
- Data URIs: Embedding small images directly in HTML or CSS:
data:image/png;base64,... - JWT tokens: JSON Web Tokens use Base64url encoding for header and payload
- HTTP Basic Auth: The
Authorization: Basicheader uses Base64-encoded credentials - Email attachments: MIME encoding uses Base64 for binary attachments
- API payloads: Sending binary data through JSON APIs
Base64 vs Base64url
Standard Base64 uses + and / characters, which can cause issues in URLs. Base64url replaces these with - and _ respectively, and omits padding = characters. JWT tokens use Base64url encoding.