Base64 Encoder/Decoder
LiveEncode text to Base64 or decode Base64 to text.
100% Private & Offline. Processed locally in your browser — your files never leave your device.
Loading tool...
Encode text to Base64 or decode Base64 to text.
100% Private & Offline. Processed locally in your browser — your files never leave your device.
Loading tool...
Convert text and binary data to Base64 format and back. Essential for developers, data transmission, and embedding resources in code. Our free Base64 encoder works entirely in your browser — your data never leaves your device.
Type text directly, paste content, or upload files including images, documents, and binary data.
Select whether to encode to Base64 or decode from Base64 back to original format.
Copy the result to clipboard or download as a file. Instant processing with no server uploads.
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used when there's a need to encode binary data that needs to be stored or transferred over media designed to deal with text.
Base64 encoding works by dividing binary data into 6-bit chunks, with each chunk mapped to a specific character in the Base64 alphabet (A-Z, a-z, 0-9, +, /).
Binary or text input
Hello6-bit chunk conversion
010010 000110...ASCII representation
SGVsbG8=Embed images directly in HTML, CSS, or JavaScript as data URIs. Reduces HTTP requests but increases file size by ~33%.
Send binary data (files, images) in JSON payloads. APIs often require Base64 encoding for binary content in JSON.
Email systems use Base64 to encode binary attachments (images, PDFs) for transmission through text-based protocols.
Store binary data in text-based systems like databases, XML files, or configuration files that don't support binary content.
Upload any file type — images, PDFs, documents — and convert to Base64. Preview images before downloading.
Encode plain text strings for use in code, APIs, or configuration files. Supports Unicode characters.
Copy encoded/decoded results to clipboard instantly. Format with line breaks for better readability.
All encoding/decoding happens locally. Your sensitive files and data never leave your device.
| Property | Value | Description |
|---|---|---|
| Alphabet | A-Z, a-z, 0-9, +, / | 64 characters representing 6-bit values (0-63) |
| Padding | = | Equals signs added to make length multiple of 3 bytes |
| Output Size | ~133% of input | Base64 encoding increases size by approximately 33% |
| Line Length | 76 chars (RFC) | Standard recommends line breaks every 76 characters |
| URL Variant | Base64URL | Uses - and _ instead of + and / for URL safety |
Base64 encoding increases file size by ~33%. For large files, consider whether direct binary transfer is more efficient than Base64 encoding.
Embedding small icons and images as Base64 data URIs can reduce HTTP requests. For larger images, traditional file serving is usually better.
Base64 is encoding, not encryption. Anyone can decode Base64. For sensitive data, use proper encryption before or instead of Base64 encoding.
Standard Base64 uses + and / which can break URLs. Use Base64URL encoding (replaces + with - and / with _) for URL parameters.