Base64 Encoder & Decoder

Convert text to Base64 and vice-versa quickly and securely.

Understanding Base64 Encoding

What is Base64?

Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format. It is designed to carry data stored in binary formats across channels that only reliably support text content. The name "Base64" comes from the fact that it uses 64 unique characters to represent data.

How does the encoding process work?

The process works by dividing every three bits of binary data into four 6-bit units. Each 6-bit unit is then mapped to a specific character in the Base64 alphabet (A-Z, a-z, 0-9, +, and /). If the final set of data is less than 24 bits, "padding" is added using the = character to ensure the data is the correct length.

Common Use Cases:

  • Email Attachments: Sending images or files via SMTP (which is text-based).
  • Data URIs: Embedding small images directly into HTML or CSS code.
  • API Authentication: Sending usernames and passwords in a basic "Authorization" header.
  • Safe URL Parameters: Transmitting complex data in a URL without breaking the link.

Is Base64 secure?

No. A common mistake is thinking that Base64 is a form of encryption. It is encoding, not encryption. Anyone who sees a Base64 string can easily decode it back to the original text. Never use Base64 to "secure" sensitive passwords or private information.