Base64 Encode & Decode
Convert text or files to Base64 and back. Handles UTF-8 properly and works offline once loaded.
How it works
Type or paste text and press Encode to get its Base64 form, or paste Base64 and press Decode. Text is converted to UTF-8 bytes first, so emoji and accented letters round-trip correctly, which the browser's bare btoa() does not do.
Tick URL-safe alphabet to use - and _ instead of + and / and drop the = padding. That variant (Base64URL) is what JWTs and many web APIs use. Decoding accepts either alphabet, missing padding and line breaks automatically.
Pick a file to turn it into a data: URI you can paste into CSS or HTML. The file is read by your browser and never uploaded. If decoded data is not valid text, the tool shows it as hex instead of garbling it.
Questions
Is Base64 encryption?
No. Base64 is an encoding that anyone can reverse. It makes binary data safe to put in text, but it does not hide it.
Why is the output bigger than the input?
Base64 uses 4 characters for every 3 bytes, so encoded data is about 33% larger.
What is the difference between Base64 and Base64URL?
Base64URL replaces + and / with - and _ so the result can sit in a URL or filename without escaping, and usually omits = padding.