Base64 Encoder
Encode any text as Base64, correctly, for anything from a password prompt to a data URI. The text is converted to UTF-8 bytes first, which is what makes emoji, Cyrillic and Chinese survive the round trip. URL-safe output is available for tokens and query strings, and long output can be wrapped the way MIME expects.
Uses a hyphen and an underscore instead of plus and slash, and drops the padding. This is what tokens and URL components require.
The MIME convention for encoded content, used by some certificate formats.
How base64 encoder works
- Type or paste the textEncoding starts as you type, in the browser.
- Choose the alphabetStandard for MIME and most APIs; URL-safe for tokens and links.
- Copy the resultThe character count and the byte count are both shown, since they differ.
What you get
Encode text as Base64 without corrupting anything outside Latin-1. Everything happens inside this page: the file is read by your browser, transformed in memory and handed straight back to you as a download. There is no upload queue, no waiting for a server, and nothing left behind when you close the tab.
Supported formats
This tool works on text you paste or type, so there is no file format to worry about. Nothing you type is sent anywhere.
Limitations, stated up front
- Base64 is not encryption and provides no confidentiality. Anyone with the text can decode it.
- Encoded output is a third larger than the input, which matters in a URL where every character also counts towards a length limit.
Frequently asked questions
Why does Base64 always add a third?
Because it turns three bytes into four characters, so three characters of input become four. A four-byte group encodes to five characters with padding, which is why encoded output is never shorter than the input. Nothing can be done about it: this is the format, not a setting.
Is Base64 encryption?
No, and this matters. Base64 is an encoding with no key: anyone can decode what you encode, instantly. It is useful for putting binary data into text-only places such as a JSON field or a URL. If you need confidentiality, you need encryption, and no amount of encoding provides it.
What is the URL-safe variant for?
For anything that will travel in a URL. The standard alphabet uses a plus and a slash, both of which mean something in a URL — a query separator and a path separator — so the safe variant substitutes a hyphen and an underscore and drops the padding that would need escaping.
How do I encode a file rather than text?
For text, this tool. A data URI such as an inline image is built the same way from the file’s bytes; the JSON tools in Furtu handle the encoding step, and nothing is uploaded to do it.