Base64 Encode & Decode

Encode and decode Base64 text.

Free. Runs in your browser: nothing you enter or open is uploaded.

Base64

  

Text is encoded as UTF-8 first, so accents, other alphabets and emoji survive the round trip. Decoding accepts standard Base64 and Base64URL, with or without padding and line breaks.

How to use it

  1. Pick a mode: encode or decode text, turn a file into Base64, or turn Base64 back into a file.
  2. Paste text or choose a file. Text results update as you type.
  3. Copy the result or download it.

Questions

Is Base64 encryption?

No. Base64 only rewrites data using 64 safe characters so it can travel through email, JSON or a URL. Anyone can decode it, so never use it to hide a password or a secret.

What is Base64URL?

A variant that uses - and _ instead of + and /, and usually drops the = padding, so the result can sit in a URL or a file name without escaping. JSON Web Tokens use it.

Why does the decoded text look garbled?

The data was probably not text, such as an image or a zip file, or it was text in an older encoding than UTF-8. Use Base64 to file to save the bytes and open them with the right program.

Why is the Base64 bigger than the file?

Every 3 bytes become 4 characters, so Base64 is about a third larger than the original. That is the cost of using only safe characters.