Base64 encode
Base64 encode. Runs on your device, nothing is uploaded.
Runs on your device. The file is never uploaded.
Base64 encode turns the bytes of any file into printable text, three input bytes at a time, using the standard 64-symbol set that btoa produces. Padding runs to a length divisible by four. Nothing is hidden by the rewrite: anyone can recover the original bytes without a key, and this set ships no decoder.
Questions
Is Base64 encryption?
No. Base64 rewrites bytes using 64 printable characters, and anyone can turn it back without a key or a password. It exists so binary data can travel through channels that only accept text, such as an email body or a JSON string. If you need the content hidden, encrypt it first and Base64 the ciphertext afterwards.
Which Base64 alphabet does this use?
The standard one: A to Z, a to z, 0 to 9, plus and slash, with equals signs padding the result to a multiple of four characters. It is built on the browser btoa function after each byte is mapped to one character, so any ordinary Base64 decoder will read the output. For a URL or a filename, use Base64URL encode instead.
Can I encode an image, a PDF or any binary file?
Yes. The tool reads the raw bytes of whatever you drop, not text, so an image or an archive encodes exactly the way a text file does. Expect the output to be about a third larger than the input, because three bytes become four characters. Drop several files at once and each one comes back as its own result.
How do I encode a short piece of text?
Save the text in a .txt file and drop that in. The page takes files, not typed input. One thing to watch: every byte in the file is encoded, so a trailing newline your editor adds on save becomes part of the result. Strip it first if the output has to match something else exactly.
Is there a matching Base64 decoder here?
Not on this page. These encoders are one way, and the site has no Base64 decode tool. The output is standard Base64, so any decoder will read it, including the one built into your browser console and into most languages as a single call.
Does my file get uploaded?
No. The encoding runs in a Web Worker inside this tab, with no server step, no account and no log. After the first visit the site works offline, so you can disconnect your network and encode anyway. The request counter on the homepage stays at zero while you do it.