Base64 Encoder / Decoder

Encode text or files to Base64, or decode Base64 strings back to text. Everything runs in your browser — nothing is sent to a server.

What is Base64?

Base64 is a binary-to-text encoding scheme that converts binary data into a string of ASCII characters. It uses 64 characters (A-Z, a-z, 0-9, +, /) to represent data, with = for padding.

Common Use Cases

  • Embedding images in HTML/CSS — Data URIs use Base64 to inline small images without extra HTTP requests.
  • Email attachments — MIME encoding uses Base64 to transmit binary files over text-based email protocols.
  • API payloads — When an API expects a string but you need to send binary data (like a file upload in a JSON body).
  • Basic Authentication — HTTP Basic Auth encodes username:password as Base64 in the Authorization header.

Important

Base64 is an encoding, not encryption. Anyone can decode a Base64 string. Never use it to hide sensitive data.

Input
Output
Input: 0 bytes Output: 0 bytes