Base64 Encode
Encodes text or a file to Base64.
This tool runs on JavaScript. To use it, turn on JavaScript in your browser and reload the page.
TURN A FILE INTO TEXT.
Base64 Encode turns any file into Base64 text made up only of letters, digits and a few signs. An image, a PDF, audio, a font or any other kind of file can be uploaded; up to 64 MB. This format is used to pass files through channels that can only carry text: email attachments, APIs that send files inside JSON, certificates embedded in configuration files, or small images embedded in HTML and CSS.
The “break lines at 76 characters” option is on by default and follows the line-length rule of email (MIME); switch it off if you want output on a single line. The “Output as a data: URI” option gives the output in the form data:image/png;base64,… ; that text can be pasted straight into an <img> tag or into url() in CSS. The file type is worked out from the file name. Important: Base64 is not encryption, anyone can decode it; and it also makes the file about 33% bigger. To turn it back, use the “Base64 Decode” tool. You can upload up to 20 files at once; they are all processed with the same settings, and several files download as a single ZIP.
From start to finish
- Upload your file. Drag any file in or select it; up to 64 MB.
- Choose the format. Leave the line breaking on for email and older tools. If you are going to embed it in HTML or CSS, switch the data: URI option on.
- Encode and download. The Base64 text comes down as a .txt file. The size increase is written on screen.
Frequently asked questions
Is Base64 secure, is it encrypted?
No. Base64 is only an encoding; it needs no key and anyone can decode it in seconds. Do not use it to protect secret data.
Why did the file get bigger?
Base64 writes every 3 bytes with 4 characters; that is why the output grows by roughly 33%. If line breaking is on, the line endings add a little more.
Where is a data: URI useful?
For embedding small icons and images in HTML or CSS without asking for a separate file. With large files it weighs the page down; use it for images of a few KB.
Does my file stay on the server?
No. Your file reaches the server only to be processed and is deleted when the job is done; the output is deleted too once you download it and leave the tool. You don't need an account, a name or an email address, and your files are never sent to a third-party service. It is free to use: we set no hourly or daily quota on the number of jobs, we don't make you watch an ad before processing, and we add no watermark to the output.
Other File tools
RUPO Studio