Base64 Converter

Encode and decode Base64 strings instantly. Convert text to Base64 and vice versa with this free online tool. Secure client-side processing.

0
Conversions
0
Bytes
0
μs

Upload a file to encode as Base64

Supports .txt, .jpg, .png, .pdf (max 10MB)

Text to Encode

Text

Base64 Output

Input: 0 chars
Output: 0 chars
Time: 0 ms

Recent Conversions

How to Use This Tool

  1. Select whether you want to encode or decode using the tabs
  2. Enter your text or Base64 string in the input field
  3. Click "Convert" to process, or use the swap button to exchange input/output
  4. Copy to clipboard or download the result as a text file

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format using 64 printable characters. It's commonly used to encode data for transmission over media that are designed to deal with textual data, such as email attachments or embedding images in HTML/CSS.

When should I use Base64 encoding?

Base64 is useful when you need to encode binary data for transmission in text-based protocols:

  • Email attachments (MIME): SMTP is designed for text, so attachments are Base64 encoded
  • Data URIs: Embed images directly in HTML/CSS (e.g., data:image/png;base64,...)
  • JSON/XML: Transmit binary data in text-based formats
  • Basic authentication: Encode username:password credentials
Does Base64 increase file size?

Yes, Base64 encoding increases file size by approximately 33%. This is because it encodes 3 bytes of binary data into 4 ASCII characters. The size increase is a trade-off for safe transmission over text-based protocols. For example, a 3KB image becomes about 4KB when Base64 encoded.

Is Base64 encryption or compression?

No, Base64 is neither encryption nor compression. It's simply an encoding scheme that converts binary data into a text format. It provides no security (anyone can decode it) and actually increases size (no compression). Think of it as a way to safely transport binary data through text-only channels.

Can I encode images with Base64?

Yes! Upload an image file using the file upload area and select "Output as image" to preview the decoded image, or "Auto download" to save it. For embedding in HTML, you can use the encoded string in a data URI like: <img src="data:image/png;base64,YOUR_ENCODED_STRING">

Common Uses

  • Data URIs: Embed images in HTML/CSS
  • Email attachments: MIME encoding
  • JSON/XML: Binary data transmission
  • Basic auth: Encode credentials

Base64 Facts

  • Size increase: +33%
  • Characters: A-Z, a-z, 0-9, +, /
  • Padding: Uses = for alignment
  • RFC: 4648 (Base64 standard)

Tips

  • ✅ Use for small files (images under 1MB)
  • ✅ Works great for data URIs
  • ❌ Not for large file transfer
  • ❌ Not secure (easily decoded)