Base64 Encoder/Decoder
Encode and decode Base64 strings
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data in ASCII string format. It's commonly used to encode data for transmission over media that only support text content.
Use Cases
鈥?Email attachments 鈥?Data URLs in HTML/CSS 鈥?API token encoding 鈥?Storing binary data in JSON/XML
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data in ASCII string format. It uses 64 characters (A-Z, a-z, 0-9, +, /) to represent binary data, making it safe for transmission over text-based protocols.
Email Attachments
MIME encoding for email attachments
Data URIs
Embed images directly in HTML/CSS
API Communication
Encode binary data in JSON/XML
Authentication
HTTP Basic Authentication headers
How to Use the Base64 Converter
Text Encoding/Decoding:
- Enter your text in the input field
- Click "Encode" to convert text to Base64
- Click "Decode" to convert Base64 back to text
- Use "Swap" to exchange input and output
Image Conversion:
- Click "Upload Image" to select an image file
- The Base64 data URI will be generated automatically
- Paste a Base64 string and click "Preview" to view as image
- Copy the Base64 string for use in your code
Frequently Asked Questions
Why use Base64 encoding?
Base64 is essential when you need to transfer binary data through text-based protocols that don't support binary. It's commonly used in emails, data URIs, and API payloads.
Is Base64 encryption?
No, Base64 is encoding, not encryption. It doesn't provide any security - anyone can decode Base64 data. Use proper encryption if security is needed.
Why is Base64 output larger than input?
Base64 encoding increases data size by approximately 33% because it uses 4 characters to represent every 3 bytes of input data.
Is my data secure?
Yes! All encoding and decoding happens locally in your browser. Your data is never sent to any server.