Base64 Encoder / Decoder
Convert text to Base64 and back, with correct UTF-8 handling.
Base64
Private by design. Everything runs locally in your browser. Your input is never uploaded, logged or stored on a server.
Frequently asked questions
What is Base64 encoding?
It maps every three bytes of input to four printable ASCII characters, letting binary data travel through text-only channels. It is an encoding, not encryption, and provides no confidentiality.
Does this handle emoji and Chinese characters?
Yes. Input is converted to UTF-8 bytes before encoding, so any Unicode text round-trips exactly. Tools built directly on `btoa` fail on this input.
What is URL-safe Base64?
A variant that swaps `+` for `-` and `/` for `_` and omits padding, so the result can appear in a URL or filename without escaping. JSON Web Tokens use it.
Is Base64 secure?
No. Anyone can decode it instantly. Use it for transport, never to hide secrets.
About the Base64 Encoder / Decoder
Base64 represents binary data using 64 printable ASCII characters, which is how binary survives transports that only accept text: email bodies, JSON strings, data URIs and HTTP headers.
The classic bug is non-ASCII input. The browser btoa function throws on any character above U+00FF, so naive implementations break on accented letters, CJK text and emoji. This tool encodes through TextEncoder first, so UTF-8 round-trips correctly. The URL-safe switch uses the base64url alphabet from RFC 4648, replacing + and / with - and _ and dropping the = padding, which is the variant used inside JWTs.