Base64 encode & decode
Both directions, UTF-8 safe, URL-safe variant included. Paste a token without wondering who else is reading it.
The browser's built-in btoa() only speaks Latin-1, which is why so many online Base64 tools quietly mangle emoji, accents and anything non-English. This one encodes through TextEncoder first, so the round trip is lossless. It also decodes URL-safe Base64 and tolerates missing padding.
Questions people ask
Does it handle emoji and accents?
Yes. btoa() alone only understands Latin-1, which is why many Base64 tools corrupt anything outside it. This one converts through TextEncoder first, so emoji, accented characters and every other UTF-8 sequence survive encoding and decoding intact.
Is my text uploaded?
No. Everything happens in your browser and the uploads counter in the top bar stays at 0. That matters more here than on most tools — people routinely paste API tokens, JWTs and credentials into Base64 decoders.
What is URL-safe Base64?
A variant that replaces + and / with - and _ and drops the = padding, so the result is safe inside a URL, a filename or a JWT. Decoding accepts either variant automatically, padded or not.
Can I encode a file?
Yes. Drop a file in and its raw bytes are encoded. If you decode something that is not text, a "Save as file" button appears so you get the original bytes back rather than a mangled string.
Does it work offline?
Yes. Once loaded it keeps working with no connection — it is just code running on your device.
How this works & why it’s private
Encoding runs your text through TextEncoder to get real UTF-8 bytes, converts those to a binary string, and hands that to btoa(). Decoding reverses it through atob() and TextDecoder, normalising the URL-safe alphabet and restoring any stripped padding first. All of it is a few lines of JavaScript executing in your tab — there is no server in the loop, which is the only reasonable way to handle a tool people paste secrets into. Open your dev-tools Network tab and watch while you type.