Base64 Encoder / Decoder

Convert text to Base64 or decode Base64 back to text.

Character Count

Input: 0 characters
Output: 0 characters

How to Use the Base64 Tool

Enter text in the input box and click "Encode to Base64" to convert it. To decode, paste Base64-encoded text and click "Decode from Base64". The tool automatically detects invalid Base64 strings and shows an error message.

What is Base64 Used For?

Base64 encoding is widely used in computing for various purposes:

  • Email attachments: MIME encoding uses Base64 to send binary files via email
  • Data URLs: Embedding images directly in HTML/CSS using base64:data URIs
  • APIs: Encoding binary data in JSON payloads
  • Authentication: Basic HTTP authentication encodes credentials in Base64
  • URL parameters: Encoding special characters in URLs

Base64 Alphabet

Base64 uses 64 characters: A-Z, a-z, 0-9, +, and /. The = character is used for padding. This makes Base64 data safe for transmission through text-based systems that might otherwise corrupt binary data.

Security Warning

Base64 is not encryption! It merely transforms data into a different representation. Anyone can decode Base64 data. If you need to protect sensitive information, use proper encryption algorithms like AES or RSA.

Frequently Asked Questions

What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to encode data for transmission over media that are designed to deal with text.
When should I use Base64?
Base64 is used when you need to encode binary data as text, such as embedding images in HTML/CSS, encoding data in URLs, or transmitting binary data in JSON or XML.
Is Base64 encryption?
No, Base64 is not encryption. It's an encoding scheme that anyone can decode. It provides no security — use proper encryption if you need to protect sensitive data.
Why does Base64 output end with '='?
The '=' characters are padding added to make the output length a multiple of 4 characters. They're only needed when the input length isn't divisible by 3.

Related Tools