Q1: What is Base64 encoding and why is it used?
Base64 is an encoding scheme that converts binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It's commonly used to encode data for transmission over text-based protocols (email, URLs, JSON), embed images in HTML/CSS, or store binary data in text formats.
Q2: How does Base64 encoding work?
Base64 takes binary data and converts it to a string of ASCII characters. Every 3 bytes of input become 4 Base64 characters. The encoding uses a 64-character alphabet, with "=" used for padding when input length isn't divisible by 3.
Q3: Is Base64 encryption?
No, Base64 is encoding, not encryption. It's easily reversible and provides no security. Anyone can decode Base64-encoded data. It's designed for data transmission compatibility, not security. Never use Base64 to "hide" sensitive information.
Q4: What can I encode with Base64?
You can encode any text, binary data, images, files, or other data. Common uses include: encoding images for data URIs, encoding binary attachments in emails, encoding credentials in HTTP Basic Auth, or converting binary data to text for JSON/XML.
Q5: How do I decode Base64?
Select "Decode" mode, paste your Base64-encoded string, and click Decode. The calculator will convert it back to the original text. If you get an error, the input may not be valid Base64 (check for proper formatting and padding).
Q6: What if I get an "Invalid input" error?
Base64 strings must contain only valid Base64 characters (A-Z, a-z, 0-9, +, /, =). Common issues: extra spaces or line breaks, invalid characters, or incomplete padding. Remove any whitespace and ensure the string is properly formatted Base64.