Base64 encode and decode files online

Turn a file into Base64 text, or turn Base64 text back into the file. Standard and URL-safe alphabet, line breaks and data URIs are supported.

Drop your files here

or choose files from your device

Up to 10 files, 50 MB in total. Accepted: any file type.

Base64 encode and decode files in your browser

Base64 turns any file into plain text made of letters, digits and a few symbols. That is why it appears everywhere that only text can travel: attachments in e-mails, images embedded in a web page, keys and certificates, or files inside a JSON request. With this tool you can Base64 encode and decode files without writing a script. Add the file, choose the direction and download the result.

To Base64 encode and decode in the form you need, several settings are available. The standard alphabet is used almost everywhere, the URL-safe alphabet replaces the characters that cause trouble in web addresses and leaves out the padding, and an optional line break after 76 characters matches the style of e-mail. If you want to embed an image or a small file in HTML or CSS, the output can be written as a data URI with the file type already filled in.

When you Base64 encode and decode, the tool is forgiving: it accepts both alphabets, with or without padding, text with line breaks or spaces, and complete data URIs. It recognises common file types from the content, so a decoded PDF or image gets the right extension. Text that is not valid Base64 is refused with a clear message instead of producing a broken file. Remember that Base64 is no encryption, because anyone can decode it.

Everything runs on our own servers in Germany, is held in memory only and deleted after the download, at the latest after an hour. Contents and names of your files are never logged. If you need to Base64 encode and decode regularly, the same function is available through the API for your own scripts and automations.

How it works

  1. Choose the direction

    Encode a file into Base64 text, or decode a text file that contains Base64.

  2. Add your files

    Drop up to 10 files onto the page. For decoding, add the text file with the Base64 content.

  3. Download the result

    Encoding gives a text file. Decoding gives the original file, with a matching file extension where we can recognise the type.

Questions and answers

What is Base64 used for?

Base64 writes binary data with letters, digits and a few symbols, so it can travel through text-only places such as e-mail, JSON, XML or web addresses. The text is about a third longer than the file.

What is URL-safe Base64?

The URL-safe form uses - and _ instead of + and / and leaves out the = padding, so it can be used in web addresses and file names without escaping.

What is a data URI?

A data URI contains the file itself in the address, for example data:image/png;base64, followed by the encoded content. It lets you embed small images directly in HTML or CSS.

Which input does decoding accept?

Plain Base64 in either alphabet, with or without padding, with line breaks or spaces, and data URIs. Text that is not valid Base64 is refused.

Is Base64 encryption?

No. Base64 only changes the form of the data and anyone can reverse it. Use the password protection tool to protect a PDF.

How large can the files be?

Up to 50 MB in total. Encoded text is larger than the original, so very large files are better transferred as they are.