← Back to Tools

Base64 Encoder

Securely encode and decode text to Base64 format. Supports UTF-8 and runs 100% in your browser.

Input Text

Result
Result will appear here...
🔒Your data never leaves your browser. All processing is locally.

How Base64 Works

🔢

The Math

Base64 splits binary data into 6-bit chunks. Each 6-bit value (0-63) maps to a specific character in the alphabet (A-Z, a-z, 0-9, +, /).

📈

Data Size

Base64 encoding increases the data size by approximately 33%. Every 3 bytes of input results in 4 bytes of encoded output string.

🛡️

URL Safety

Standard Base64 uses + and / which aren't URL safe. "URL Safe" Base64 replaces these with - and _ to allow usage in web addresses.

Use Cases

📧

Email Attachments

Email protocols utilize Base64 to transmit binary attachments like images or PDFs over text-only SMTP servers.

🖼️

Data URIs

Embedding small images directly into HTML or CSS using `data:image/png;base64,...` to reduce HTTP requests.

🔑

Basic Auth

HTTP Basic Authentication requires credentials to be concatenated (`user:pass`) and Base64 encoded in the header.

💾

Data Storage

Storing complex binary objects in text-based formats like XML or JSON databases.

Frequently Asked Questions