Base64 Encode/Decode
Free online Base64 encoder and decoder. Convert text to Base64 and Base64 to text instantly. No server upload, 100% private - runs entirely in your browser.
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format using 64 characters. It's commonly used to embed binary data in text-based formats.
How does Base64 encoding work?
Base64 takes 3 bytes (24 bits) of binary data and converts them into 4 ASCII characters (each representing 6 bits). This increases the data size by approximately 33%.
What characters are used in Base64?
Base64 uses 64 characters: A-Z (26 uppercase), a-z (26 lowercase), 0-9 (10 digits), + and /. The = character is used for padding.
Is it safe to use this Base64 tool?
Yes, all processing is done locally in your browser. No data is sent to any server, ensuring 100% privacy and security.
What is URL-safe Base64?
URL-safe Base64 replaces + with - and / with _, and removes padding (=). This makes it safe to use in URLs and filenames without encoding issues.
Why does Base64 increase file size?
Base64 converts 3 bytes into 4 characters, resulting in a 33% size increase. This overhead is necessary to represent binary data as printable text.
What are common uses of Base64?
Base64 is used for embedding images in CSS/HTML, encoding email attachments (MIME), storing passwords in databases, transmitting binary data over text protocols, and data URIs.
Can I decode any Base64 string?
Yes, as long as it's a valid Base64 encoded string. If the string contains invalid characters or incorrect padding, the tool will alert you.
What is the padding character (=) for?
Padding (=) ensures the Base64 string length is a multiple of 4. It's added when the input data length isn't divisible by 3.
Can Base64 encode images?
Yes, Base64 can encode any binary data including images. The result is a text string that can be embedded directly in HTML/CSS using data URIs.
Is Base64 encryption?
No, Base64 is encoding, not encryption. It's easily reversible and provides no security. It's meant for data representation, not protection.
What's the difference between Base64 and UTF-8?
UTF-8 is a character encoding for Unicode text. Base64 is a binary-to-text encoding scheme. UTF-8 represents text characters; Base64 represents binary data as text.