๐ฆ Base64/Base32/Base16 Encoder/Decoder - Free Online Converter
Free online Base64, Base32, and Base16 (HEX) encoder and decoder. Convert text and images to multiple encoding formats instantly. Support for standard and URL-safe Base64, Data URI format, auto-convert, image preview, and more. 100% client-side processing.
URL-Safe replaces + with - and / with _ for use in URLs
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to encode data that needs to be stored or transferred over media designed to deal with text. Base64 encoding converts binary data into a string of 64 characters (A-Z, a-z, 0-9, +, /).
Base64 encoding increases the size of the data by approximately 33%, but it ensures that the data can be safely transmitted through text-based protocols like email, JSON, XML, or URLs. It's widely used in web development, data storage, and API communications.
Our free online Base64 converter supports both text and image encoding/decoding, with options for standard Base64, URL-safe Base64, and Data URI formats. All processing happens entirely in your browser for maximum privacy and security.
How Base64 Encoding Works
Base64 encoding works by converting binary data into a text representation using a 64-character alphabet. The process involves:
- Binary to 6-bit chunks: The input data is divided into 6-bit chunks (since 2^6 = 64)
- Character mapping: Each 6-bit chunk is mapped to one of 64 characters (A-Z, a-z, 0-9, +, /)
- Padding: If the input length isn't divisible by 3, padding characters (=) are added
- Output: The result is a Base64-encoded string that can be safely transmitted as text
Decoding reverses this process, converting the Base64 string back to its original binary or text format.
Common Use Cases
๐ Web Development
Embed images directly in HTML/CSS using data URIs. Encode API payloads, authentication tokens, or binary data for JSON transmission.
๐ง Email Attachments
Encode binary attachments (images, documents) for email transmission. Many email systems use Base64 encoding for attachments.
๐ Data Storage
Store binary data in text-based storage systems like databases, configuration files, or JSON documents that don't support binary data natively.
๐ URL Encoding
Use URL-safe Base64 encoding for data in URLs. URL-safe Base64 replaces + with - and / with _ to avoid URL encoding issues.
๐ฑ API Development
Encode binary data, authentication tokens, or payloads for API requests. Base64 is commonly used in REST APIs and GraphQL for transmitting binary data in JSON format.
๐ผ๏ธ Inline Images
Embed images directly in HTML or CSS using Data URIs. This eliminates HTTP requests for small images and improves page load performance for critical assets.
Key Features
Text & Image Support
Encode and decode both text strings and images. Upload images to get Base64 data URIs or raw Base64 strings. Decode Base64 strings back to images with automatic format detection.
URL-Safe Encoding
Choose between standard Base64 or URL-safe Base64 encoding. URL-safe format is perfect for embedding in URLs or query parameters.
Auto-Convert
Enable auto-convert to automatically encode text as you type or decode Base64 strings. Real-time conversion for faster workflow.
Size Information
See character count, byte size, and size increase percentage. Understand the encoding overhead for your data.
Export Options
Copy Base64 strings to clipboard or export to text files. Download decoded images directly from Base64 data URIs. Choose between Data URI format (with prefix) or raw Base64 strings.
Privacy First
All encoding and decoding happens locally in your browser. We never see, store, or have access to your data.
Frequently Asked Questions
What's the difference between standard and URL-safe Base64?
Standard Base64 uses + and / characters, which need URL encoding in URLs. URL-safe Base64 replaces + with - and / with _, making it safe to use directly in URLs without additional encoding.
How much does Base64 encoding increase file size?
Base64 encoding increases data size by approximately 33%. This is because every 3 bytes of binary data becomes 4 Base64 characters. The exact increase depends on the original data.
Can I encode images larger than 10MB?
Our tool limits image uploads to 10MB to ensure good performance. For larger images, consider compressing them first or using server-side encoding tools.
Is Base64 encoding secure?
Base64 is an encoding scheme, not encryption. It doesn't provide security or privacy - it's just a way to represent binary data as text. Anyone can decode Base64-encoded data.
Do you store my encoded/decoded data?
No, absolutely not. All encoding and decoding happens entirely in your browser. We never see, store, transmit, or have any access to your data. Your privacy is completely protected.
What is a Data URI and when should I use it?
A Data URI is a Base64-encoded string prefixed with 'data:image/png;base64,'. It's used to embed images directly in HTML or CSS without separate image files. Use Data URI format for web development, or raw Base64 for API payloads.
How do I decode a Base64 image string?
Paste your Base64 string (with or without Data URI prefix) into the Base64 Output field, then click 'Decode Base64 โ Image' button. The tool will automatically detect the format and display the image preview.
Can I use Base64 in CSS background images?
Yes! Use the Data URI format for CSS. For example: background-image: url('data:image/png;base64,iVBORw0KGgo...'). This eliminates the need for separate image files.
What characters are used in Base64 encoding?
Base64 uses 64 characters: A-Z (26), a-z (26), 0-9 (10), plus + and / (2). URL-safe Base64 replaces + with - and / with _. Padding uses = characters.
Related Converter Tools
CSV โ JSON
Convert CSV to JSON and back
Morse Code
Encode/decode Morse code
Temperature Converter
Convert Celsius, Fahrenheit, Kelvin
Unit Converter
Convert length, weight, volume, area, time
Text โ Binary
Convert text to binary and back
Roman Numerals
Convert numbers to Roman numerals