Base64 Encode and Decode

Encode text to Base64 or decode Base64 back to text, with full support for special characters and emoji. You can also turn a small file into a Base64 string. Results appear as you type, and everything happens in your browser.

All Free ToolsJSON FormatterURL Encode and DecodeUUID Generator

Everything is converted in your browser. Your text and files are not uploaded to our servers.

What Is Base64?

Base64 is a way to write any data using only 64 safe characters: the letters A to Z and a to z, the numbers 0 to 9, plus the symbols + and /. It is used to send binary data, such as an image or a file, through systems that only handle plain text, for example emails, JSON and web addresses. Base64 is an encoding, not encryption. Anyone can decode it, so it never protects secrets.

How to Encode and Decode

  1. Choose Encode text to Base64 or Decode Base64 to text.
  2. Type or paste your text in the first box. The result appears in the second box as you type.
  3. Press Copy result. Use Swap input and result to flip the direction and check that the text comes back the same.

URL Safe Base64

Standard Base64 uses + and / and ends with = signs, which have special meanings in web addresses. URL safe Base64 replaces + with – and / with _, and leaves out the = signs. Tick URL safe Base64 when you encode if the result goes into a link, a token or a file name. The decoder understands both versions.

Encoding a File

Choose a file and the tool turns it into a Base64 string. Tick the data URI option if you want the result to start with a prefix like data:image/png;base64, so you can use a small image directly in HTML or CSS. Keep in mind that Base64 makes data about one third larger, so it is best for small files.

Limits to Know About

  • Base64 is not secure. Do not use it to hide passwords or private data.
  • The decoder shows text only. If the decoded data is a file or an image, you see a message instead of readable text.
  • Files above 5 MB are not accepted, to keep your browser fast.
  • If your Base64 contains line breaks or spaces, they are ignored when decoding.

Frequently Asked Questions

Is Base64 encryption?

No. It only changes how data is written. Anyone can decode it, so do not use it to protect sensitive information.

Does it support emoji and non-English text?

Yes. Text is converted using UTF-8, so Arabic, Chinese, emoji and other characters encode and decode correctly.

Why does my Base64 end with equal signs?

The = signs are padding that makes the length a multiple of 4. URL safe Base64 usually leaves them out.

Why does decoding fail?

The text may contain characters that are not part of Base64, or it may be cut off. Check that you copied all of it.

Is my data uploaded anywhere?

No. All conversion happens in your browser and nothing is sent to our servers.

More Free Tools

Try the JSON formatter, the URL encoder and decoder, the UUID generator or the binary translator, or browse all free online tools.