Encode and decode text, files, and images to/from Base64. Live conversion, URL-safe mode, file support. 100% private.
100% Client-Side — Nothing leaves your browserBase64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters: A-Z, a-z, 0-9, +, and /, with = used for padding. It converts every 3 bytes of input into 4 ASCII characters, resulting in approximately 33% size increase.
| Use Case | Example | Why Base64? |
|---|---|---|
| Email attachments | MIME encoding | SMTP only supports 7-bit ASCII |
| Data URIs in HTML/CSS | data:image/png;base64,... | Embed images without separate HTTP requests |
| API payloads (JSON) | Binary data in JSON fields | JSON only supports text, not raw binary |
| JWT tokens | Header and payload sections | URL-safe text representation of JSON |
| Basic auth headers | Authorization: Basic dXNlcjpwYXNz | Encode username:password for HTTP |
| Storing binary in databases | BLOB to text column | Text columns are often easier to handle |
| Configuration files | Certificates, keys | PEM format uses Base64 for cryptographic data |
| Feature | Standard Base64 | URL-Safe Base64 |
|---|---|---|
| Characters | A-Z, a-z, 0-9, +, / | A-Z, a-z, 0-9, -, _ |
| Padding | = (required) | Optional (often removed) |
| Used in | Email (MIME), PEM, XML | URLs, JWTs, filenames, cookies |
| RFC | RFC 4648 Section 4 | RFC 4648 Section 5 |
The 64 characters used (plus padding =):
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
Each character represents 6 bits (2^6 = 64). Three bytes (24 bits) become four Base64 characters.
Does Base64 encrypt data?
No. Base64 is encoding, not encryption. Anyone can decode Base64 without a key. It is designed for data transport, not security. Never use Base64 alone to protect sensitive information.
Why does Base64 increase file size by 33%?
Base64 uses 4 characters to represent every 3 bytes (4/3 = 1.33x). This is because each Base64 character encodes 6 bits, while each byte is 8 bits. 8/6 rounded up = 33% overhead.
Can I encode images to Base64?
Yes. Use the "File / Image" tab above. Drag any image and get its Base64 representation with the proper data URI prefix for embedding in HTML/CSS.
What is the maximum size for Base64 encoding?
There is no theoretical limit. However, browsers and servers have practical limits. Data URIs work well up to ~100KB. For larger files, use standard file uploads instead.