Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 to text with this simple tool.

About Base64 Encoding

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used when there's a need to encode binary data that needs to be stored and transferred over media that are designed to deal with text.

Common Uses of Base64:

  • Email Attachments: MIME format uses Base64 to encode binary attachments.
  • Data URLs: Embedding images directly in HTML or CSS using the data: URI scheme.
  • API Communication: Sending binary data in JSON payloads.
  • Basic Authentication: Encoding username and password credentials.
  • Storing Binary Data: When binary data needs to be stored in text-based formats like XML or JSON.

Characteristics:

  • Base64 encodes 3 bytes into 4 ASCII characters.
  • The encoded output is approximately 33% larger than the original data.
  • Base64 uses only the characters A-Z, a-z, 0-9, +, /, and = (for padding).
  • The encoding is reversible, allowing the original data to be retrieved.