Base64 Encoder/Decoder

Encode and decode Base64 strings

Text → Base64

Base64 → Text

About Base64

  • • Base64 encoding converts binary data to ASCII text
  • • Commonly used in web development, email, and data URLs
  • • Each 3 bytes of input becomes 4 characters of output
  • • Safe for transmission through text-based protocols

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a string of ASCII characters. It uses a set of 64 characters (A-Z, a-z, 0-9, +, /) to represent data, making it safe for transmission through text-based protocols like email (MIME) and HTTP.

Common Use Cases

  • Email Attachments: MIME encoding uses Base64 to embed binary files (images, documents) in email messages.
  • Data URIs: Embed small images or fonts directly in HTML or CSS using Base64-encoded data URIs, reducing HTTP requests.
  • API Communication: Encode binary data (such as images or files) for inclusion in JSON payloads, since JSON only supports text.
  • Basic Authentication: HTTP Basic Authentication encodes the username:password pair in Base64 before sending it in the Authorization header.
  • Storing Binary in Text: Store binary data in databases or configuration files that only support text formats (XML, JSON, YAML).

Important Notes

Base64 is an encoding, not encryption. It does not provide any security — anyone can decode a Base64 string. The encoded output is approximately 33% larger than the original data. This tool processes all data locally in your browser; nothing is sent to any server.