What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format. It represents binary data in a radix-64 representation using 64 printable characters (A-Z, a-z, 0-9, +, /). This makes it ideal for transmitting data over media designed to handle textual content, such as email bodies, HTTP parameters, or embedding binary data directly in HTML, CSS, and JavaScript files.
How to Use Base64 Encoder/Decoder
- For Text: Type or paste your text in the input field, then click "Encode" to convert to Base64 or "Decode" to convert from Base64
- For Files: Switch to the File tab, drag and drop or click to upload an image or any file
- Configure Options: Enable URL-safe encoding or Data URI prefix as needed
- Copy or Download: Copy the result to clipboard or download the decoded file
Common Use Cases
- Data URIs: Embed images directly in HTML/CSS without external files
- Email Attachments: Encode binary files for MIME email transmission
- API Authentication: Encode credentials for HTTP Basic Authentication
- JSON/XML Storage: Store binary data in text-based formats
- URL Parameters: Pass binary data through URLs safely
Features
- 100% Client-Side: All processing happens in your browser, no data sent to servers
- Text & File Support: Encode/decode both text strings and file uploads
- URL-Safe Mode: Generate Base64Url compatible strings for URLs
- Data URI Generator: Create ready-to-use data URI strings with MIME type prefix
- Image Preview: Visual preview of uploaded images before conversion
- Drag & Drop: Easy file upload with drag and drop support