Base64 Encoder
Encode and decode Base64, including files and non-English text.
About Base64
Base64 represents arbitrary bytes using 64 printable ASCII characters. It exists because plenty of systems only reliably carry text β email bodies, JSON payloads, URLs, config files, HTML attributes β and binary data has to survive the trip. The cost is size: Base64 output is about 33% larger than the input, because every three bytes become four characters.
This tool handles non-English text correctly by encoding to UTF-8 first. That matters:
the naive JavaScript btoa() throws an error on anything outside Latin-1, so
plenty of online encoders simply fail on emoji, Arabic, Chinese or even an accented Γ©.
Base64 is encoding, not encryption
This is worth stating plainly, because it is a recurring security mistake. Base64 is completely reversible by anyone, with no key and no secret. Encoding a password, an API key or a token in Base64 provides no protection whatsoever β it is obfuscation at best, and it is trivially undone by pasting it into a page like this one.
Its legitimate uses are transport and embedding: attaching files to email via MIME,
inlining a small image as a data: URI, or carrying binary blobs inside JSON.
Frequently asked questions
What is Base64 used for?
Carrying binary data through channels that only handle text β email attachments, data URIs for inline images, binary fields inside JSON, and encoded values in config files and HTTP headers.
Is Base64 encryption?
No. It is a reversible encoding with no key, so anyone can decode it instantly. Never use it to protect passwords, tokens or any other secret.
Why do other Base64 tools break on emoji?
Because they use JavaScript's btoa() directly, which only accepts Latin-1 characters and fails on anything else. This tool converts text to UTF-8 bytes first, so emoji and any language encode and decode correctly.
What is URL-safe Base64?
A variant that replaces + with - and / with _ and drops the = padding, so the result can sit in a URL or filename without being escaped. It is what JSON Web Tokens use.
Are my files uploaded when I encode them?
No. Files are read locally by your browser and converted in the page. Nothing is sent to a server at any point.