Base64 and Other Encoding
Convert text and files to and from various encoding formats including Base64, Base32, Base16, ASCII85, and Base58.
Input
Output
About Base64 and Other Encoding
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses a set of 64 characters (A-Z, a-z, 0-9, + and /) to encode data, which is why it's called "Base64." The encoding is designed to carry data across channels that only reliably support text content.
How Base64 Works
Base64 encoding works by taking three 8-bit bytes (24 bits total) from the binary data and converting them into four 6-bit Base64 characters. Each Base64 character represents 6 bits of data, so 4 Base64 characters represent 24 bits (or 3 bytes) of binary data.
Padding characters ('=') may be added at the end of the Base64-encoded data to make the length a multiple of 4 characters, which is required by many applications.
Key Features of Our Encoding Tool
- Support for multiple encoding formats (Base64, Base32, Base16, ASCII85, Base58)
- URL-safe Base64 variant for use in URLs and filenames
- File encoding/decoding capabilities
- Custom options for each encoding format
- Client-side processing (your data never leaves your browser)
- Download functionality for encoded/decoded output
Supported Encoding Formats
- Standard Base64: Uses 64 characters (A-Z, a-z, 0-9, +, /) to represent binary data. Every 3 bytes of binary data are represented as 4 characters.
- URL-safe Base64: Same as standard Base64 but replaces '+' and '/' with '-' and '_' to avoid URL encoding issues.
- Base32: Uses 32 characters (A-Z and 2-7) to represent binary data. More verbose than Base64 but resilient to case changes.
- Base16 (Hex): Uses 16 characters (0-9, A-F) to represent binary data. Each byte becomes two hex characters.
- ASCII85: Uses 85 printable ASCII characters for encoding. Every 4 bytes become 5 characters, making it 20% more efficient than Base64.
- Base58: Uses 58 characters (removes 0, O, I, l from alphanumerics) to prevent visual ambiguity. Popular in cryptocurrencies for addresses.
Common Use Cases
These encoding formats are used in various applications:
- Email attachments (MIME encoding)
- Data URIs for embedding images or other binary data in HTML or CSS
- JSON data when binary content needs to be included
- Cryptographic applications
- Transmitting binary data over text-only protocols
- Storing binary data in text-only storage systems
- QR codes and barcodes
Security Considerations
Important things to remember about these encoding methods:
- Encoding is not encryption - it provides no security or privacy
- Anyone can decode the data without a key
- Encoded data is typically larger than the original binary (Base64 increases size by ~33%)
- For secure transmission, always use encryption on top of encoding