Base64 Encoder & Decoder - Encode and Decode Base64 Online
Encode text to Base64 or decode Base64 strings back to plain text. Base64 encoding is commonly used for data transmission, embedding images in HTML/CSS, and encoding binary data as ASCII text.
Why Use Base64 Encoding?
- Data URLs: Embed images and files directly in HTML/CSS
- API Transmission: Send binary data over text-based protocols
- Email Attachments: Used in MIME for email encoding
- Authentication: Basic HTTP authentication uses Base64
Common Use Cases
🖼️ Data URLs
Embed images directly in HTML, CSS, or JavaScript.
🔐 Basic Auth
Encode credentials for HTTP Basic Authentication.
MIME encoding for email attachments.
🔄 Data Transfer
Send binary data over text-only channels.
How to Use This Tool
- Choose Mode: Select "Encode" to convert text to Base64 or "Decode" to convert Base64 to text.
- Enter Data: Type or paste your text or Base64 string.
- Get Result: The conversion happens instantly - copy the result.
💡 Tip: Base64 is NOT encryption - it's encoding. Don't use it for sensitive data protection.
Base64 Encoder / Decoder
What is Base64 Encoding?
Base64 is an encoding scheme that converts binary data into ASCII text format using 64 printable characters (A-Z, a-z, 0-9, +, /). This makes it safe to transmit binary data over text-based protocols.
How Base64 Works
- Takes 3 bytes (24 bits) of input
- Splits into 4 groups of 6 bits each
- Maps each 6-bit group to a Base64 character
- Uses padding (=) when input length isn't divisible by 3
Example Conversion
Original Text:
Hello World!
Base64 Encoded:
SGVsbG8gV29ybGQh
Common Applications
- Data URLs:
data:image/png;base64,iVBORw0KG... - HTTP Basic Auth:
Authorization: Basic dXNlcjpwYXNz - JWT Tokens: Header and payload are Base64 encoded
- Email (MIME): Attachments in email messages
- CSS: Background images as data URLs
Important Notes
- Base64 increases data size by approximately 33%
- It's encoding, NOT encryption - anyone can decode it
- Don't use Base64 to "hide" passwords or sensitive data
- URL-safe Base64 variants use - and _ instead of + and /
Related Tools
- URL Encoder - Encode URLs and query parameters
- HTML Encoder - Encode HTML special characters
- JWT Tools - Decode JWT tokens
- Image to Base64 - Convert images to Base64