Base64 Encoder / Decoder
Encode text to Base64 or decode it back. Unlike a bare btoa() call, this handles UTF-8 correctly, so accents, emoji and non-Latin scripts survive the round trip.
Runs entirely in your browser. Nothing you paste is uploaded.
Encoded/decoded result will appear here...
About the Base64 Encoder / Decoder
Base64 maps arbitrary bytes onto 64 safe ASCII characters, costing about 33% size inflation in exchange for surviving transports that only accept text. It appears in data URLs, email attachments, JWT segments, and HTTP Basic auth headers.
It is an encoding, not encryption. Anyone can reverse it instantly. If you are Base64-ing something to hide it, you are not hiding it.
Frequently asked questions
Why does btoa() fail on emoji?
btoa() only accepts characters in the Latin-1 range. Anything above U+00FF throws an InvalidCharacterError. The text has to be converted to UTF-8 bytes first, which is what this tool does for you.
What is base64url and how is it different?
It swaps + and / for - and _ and usually drops the = padding, so the result is safe in URLs and filenames. JWTs use base64url, which is why pasting a raw JWT segment into a standard decoder sometimes fails.
Is Base64 secure?
Not at all. It is reversible by design and provides zero confidentiality. Use encryption if you need secrecy.