Base64 Encoder for Text and Files
Encode text or a file into Base64.
// What the controls do
- >[ENCODE] — Converts the text in INPUT, or the file you picked, using the options on the left.
- >[UPLOAD FILE] — Reads a file from your device and encodes its bytes; the result appears as soon as it loads.
- >--url-safe — Writes - and _ instead of + and /, so the value can sit in a URL or a filename unchanged.
- >--no-pad — Removes the trailing = signs for formats that expect an unpadded value.
- >[copy] — Copies the whole OUTPUT string to the clipboard.
// A text input and its Base64 output
IN
Hello World
OUT
SGVsbG8gV29ybGQ=
The eleven bytes of "Hello World" come out as sixteen characters: every three bytes become four characters, and the final = pads the last group.
// Questions about encoding
Can I encode any type of file?
Yes. The encoder does not inspect the file type; it reads the bytes and encodes them. A large file simply produces a very long string and takes longer to convert in the tab.
Why is the Base64 string longer than the original?
Every three bytes become four characters, so expect roughly a third more characters than the input has bytes. That overhead is the price of staying inside printable ASCII.
Does it handle Chinese text and emoji?
Yes. Text is converted to UTF-8 bytes before encoding, so non-Latin characters and emoji encode without an error and come back unchanged on the decoder page.