Base64 Encoder/Decoder
Easily encode text and files to Base64, or decode Base64 strings back to their original format. Works with UTF-8 text and binary files.
About Base64 Encoding
Base64 is a method of encoding binary data into ASCII text format. This tool makes it simple to encode and decode data, whether you're working with text or files. Base64 is essential for transmitting binary data over text-based protocols like email and HTTP.
What is Base64?
Base64 is a standard encoding scheme that represents binary data in a human-readable ASCII string format. It uses 64 characters (A-Z, a-z, 0-9, +, /) to encode data, making it safe to transmit across systems that may not handle binary data properly. This encoding increases the output size by approximately 33% compared to the original data.
Common Use Cases
- Email Attachments: Email systems traditionally use Base64 to encode file attachments.
- Data URLs: Embed images and other files directly in HTML using Base64-encoded data URLs.
- API Communication: Send binary data through REST APIs that expect text payloads.
- Configuration Files: Store sensitive binary data in text-based configuration files.
- Data Transfer: Transfer files across systems with limited binary support.
- Authentication: Encode credentials for HTTP Basic Authentication headers.
Text Mode vs File Mode
Text Mode: Perfect for encoding and decoding simple text strings. Supports UTF-8 encoding and includes automatic detection of Base64 input.
File Mode: Handle files of any type. Drag and drop to upload, or paste Base64 strings to decode back to the original file. Great for working with images, documents, and other binary files.
How to Use
- Text Mode: Enter text or Base64 in the input area and click "Encode to Base64" or "Decode from Base64".
- File Mode - Encode: Drag and drop a file or click to select. The tool will automatically generate the Base64 string.
- File Mode - Decode: Paste a Base64 string and click "Decode & Download" to restore the original file.
- Use the copy buttons to copy output to clipboard, or download as a separate file.
Key Features
- Auto-Detection: Text mode automatically detects if input looks like Base64 and suggests the appropriate action.
- Character Counting: See the size of input and output for both text and files.
- Drag & Drop: Easily upload files in file mode without browsing directories.
- UTF-8 Support: Properly handles Unicode characters and special symbols.
- Download Options: Export results as files or copy to clipboard.
Technical Details
- Base64 uses the standard RFC 4648 alphabet: A-Z, a-z, 0-9, +, /
- Padding character is = (equals sign)
- Output is approximately 33% larger than the original input
- Text is encoded as UTF-8 before Base64 conversion
- Files maintain their original binary format through encoding
Privacy Note
All encoding and decoding happens entirely in your browser. No data is sent to servers, ensuring complete privacy and security of your information.