Runs in your browser

Base64 Encode/Decode

Encode and decode Base64, UTF-8 safe.

Part of the Developer Tools bot
Processed in your browser
Drop a file

About the Base64 Encoder and Decoder

Encode text or files to Base64, or decode Base64 back, with full UTF-8 support for every language and emoji. Supports URL-safe Base64 and data URIs, and recognises decoded images, PDFs and other files.

How to encode or decode Base64

  1. Choose Encode or Decode, and Text or File.
  2. Type or paste text, or choose a file. The result appears instantly.
  3. Copy the result, or download it. Decoded files are saved with the right type.

Text vs file encoding

Text mode converts characters to UTF-8 bytes first, so Hindi, Telugu, emoji and accented letters encode and decode correctly. Many simple tools break on these. File mode encodes the raw bytes of any file, such as an image for a data URI or an attachment for an API.

Forgiving decoder

Pasted Base64 often has line breaks, spaces, missing = padding or URL-safe - and _ characters. The decoder handles all of these, and tells you clearly when the input isn't Base64.

Recognises decoded files

When decoded data is an image, PDF, ZIP or other binary file, it is detected and offered as a download with the right extension. Images are previewed.

Questions

Is Base64 encryption?

No. Base64 is an encoding that anyone can reverse. Don't use it to protect passwords or secrets.

What is URL-safe Base64?

A variant that uses - and _ instead of + and /, and usually drops the = padding, so it can go in URLs and file names. JWT tokens use it.

Why is the output bigger than the input?

Base64 turns every 3 bytes into 4 characters, so encoded data is about 33% larger.

Are my files uploaded?

No. Files are read and encoded in your browser.

Also searched as: base64 encode · base64 decode · base64 converter · image to base64 · base64 to file · base64 online