64

Base64 Encoder

Encode text or files to Base64 format

About the Base64 Encoder

This tool Base64 encodes text or files into an ASCII string suitable for data URIs, HTTP headers and JSON fields. Text is encoded through UTF-8 so accented characters and emoji come out correctly, and nothing is uploaded.

Base64 encode data whenever it has to travel through something that only carries plain text. A data URI embedding an image directly in CSS, an HTTP basic auth header, a certificate pasted into a config file, or binary content stuffed into a JSON string field all use it.

The encoding maps every three bytes onto four ASCII characters, which is why output is roughly 33% larger than the input. That overhead is the price of safety, so it is worth avoiding for large payloads — a Base64 image in CSS is convenient for a 2 KB icon and a bad idea for a 500 KB photograph.

Encoding is not encryption and offers no protection. It is trivially reversible by anyone, which is exactly what the Base64 decoder does. Files as well as text can be encoded here, all in your browser.

How to use the Base64 Encoder

  1. Choose text or file. Paste text, or select a file to encode.
  2. Encode. The Base64 string is produced immediately.
  3. Check the size. Remember the output is about a third larger than the input.
  4. Copy the string. Take the Base64 output for your data URI, header or JSON field.

Base64 Encoder features

  • Encode plain text or binary files
  • UTF-8 handling so accents and emoji survive
  • Output suitable for data URIs and auth headers
  • Instant results as you type
  • One-click copy of the encoded string
  • Runs entirely in your browser

Frequently asked questions

What is Base64 encoding used for?

Moving data through channels that only carry text — data URIs, HTTP auth headers, certificates in config files and binary content inside JSON strings.

Does Base64 encoding secure my data?

No. It is trivially reversible by anyone and provides no protection. Use real encryption if the data is sensitive.

Why is the output larger than the input?

Base64 maps three bytes onto four characters, so encoded data is roughly 33% bigger than the original.

Are accented characters and emoji handled?

Yes. Text is encoded through UTF-8, so non-ASCII characters survive the round trip intact.

Can I encode a file?

Yes. Select a file instead of pasting text and it is encoded in your browser without being uploaded.