All tools

Base64 encode

Encoding writes the whole file out as Base64 text — on one line, which is what a data URL needs, or wrapped at 80 characters to fit an email. Decoding reads the text back into a file, and the file is named from what is inside it: the bytes of a picture, a PDF, a workbook or a sound recording say what they are, so a decoded photo comes back as a .jpg instead of .bin. A data URL's own type is kept where it is there, the name encoding produced — photo.jpg.base64.txt — comes back off, and a .docx inside a ZIP is told apart from a plain .zip by the names in the archive. Where the bytes give nothing away, the extension can be typed in by hand rather than guessed at.

Drop your file here

In goes any file, out comes the Base64 text — or the other way round.

Settings

Off keeps it on one line, which is what a data URL needs.

The whole file as Base64 text