Base64 Encode/Decode

Encode text to Base64 or decode Base64 back to text instantly.

This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.

Can't find what you need?

Request a Tool

How to Use the Base64 Encoder/Decoder

This tool converts text to Base64 encoding or decodes Base64 strings back to readable text. All processing happens in your browser, so your data never leaves your device.

  1. Select your mode. Choose "Encode" to convert plain text into Base64, or "Decode" to convert a Base64 string back to readable text.
  2. Enter your text. Type or paste your content into the input field. The output updates instantly as you type.
  3. Read the result. The encoded or decoded output appears in the output box below. The result card shows the output character count for quick reference.
  4. Copy or share. Click Copy to copy the result to your clipboard, or Share to generate a link with your input pre-filled.

This encoder handles Unicode text properly by converting characters through UTF-8 encoding before applying Base64. This means accented letters, emoji, Chinese characters, and other non-ASCII text encode and decode correctly.

About Base64 Encoding

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A-Z, a-z, 0-9, +, and /). It is widely used in web development, email systems, and data storage to safely transmit binary data through text-only channels.

Common uses include embedding images in HTML or CSS via data URIs, encoding email attachments in MIME format, transmitting binary data in JSON or XML payloads, and storing small pieces of binary data in configuration files. Base64 encoding increases data size by approximately 33%, so it is best suited for small payloads rather than large files.

The "=" padding characters at the end of Base64 strings ensure the encoded length is a multiple of 4 characters. You may see one or two padding characters depending on the input length.

Frequently Asked Questions

Is Base64 encoding the same as encryption?

No. Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string back to the original data without a key. It provides no security or privacy. Base64 is designed for safe data transport through text-based systems, not for protecting sensitive information. If you need to protect data, use proper encryption like AES or RSA before Base64 encoding.

Why does Base64 make the output larger than the input?

Base64 represents every 3 bytes of input as 4 ASCII characters, resulting in approximately 33% size increase. This overhead is the trade-off for being able to safely transmit binary data through text-only channels like email, JSON, and URL parameters. For large files, this overhead adds up, which is why Base64 is best used for small payloads.

Does this tool handle Unicode and emoji?

Yes. This tool uses the TextEncoder API to convert Unicode text to UTF-8 bytes before Base64 encoding. This means characters like accented letters, CJK characters, and emoji all encode and decode correctly. Many simple Base64 tools fail on non-ASCII text because they skip the UTF-8 conversion step.

What are common uses of Base64 in web development?

The most common uses are: embedding small images in CSS or HTML using data URIs, encoding binary data in JSON API payloads, encoding authentication credentials in HTTP Basic Auth headers, storing binary data in localStorage or cookies, and encoding email attachments in MIME format. For images, data URIs with Base64 are best for icons under 10KB to avoid extra HTTP requests.