About Base64 encoder
Base64 represents arbitrary bytes using only 64 printable ASCII characters. It exists because a lot of systems — email headers, JSON string fields, data URIs, HTTP basic auth — can carry text safely but mangle raw binary. Encoding costs about 33% more size in exchange for surviving that trip intact.
Paste text to convert it either direction. The direction control switches between encoding and decoding, and URL-safe mode swaps the two characters that cause trouble in links.
On UTF-8, which is where most Base64 tools quietly break. The browser's built-in `btoa` only accepts characters in the latin1 range. Feed it an emoji, a Chinese character, or even an accented "é" and it either throws or produces a string that decodes back to garbage. This tool encodes to UTF-8 bytes first and decodes back through UTF-8, so text in any language round-trips correctly. If you have ever base64-encoded something elsewhere and got mojibake back, this is almost certainly why.
URL-safe Base64 replaces `+` with `-` and `/` with `_`, and drops the trailing `=` padding. Standard Base64 breaks when placed in a URL because `+` means "space" in query strings and `/` starts a new path segment. JWTs use the URL-safe variant, which is why a JWT payload often will not decode in a tool that only understands the standard alphabet. Decoding here accepts both, so you do not have to know which you were handed.
Base64 is not encryption. It is an encoding, fully reversible by anyone, with no key involved. It hides nothing. Credentials in an HTTP basic auth header are base64-encoded and are effectively plaintext to anyone who intercepts them — which is exactly why that header must only travel over HTTPS.
Everything runs locally. That matters here because base64 blobs frequently contain API keys, session tokens and auth headers — the sort of thing you should not paste into a server you do not control.
Questions
Does this handle emoji and non-English text?
Yes. Text is encoded as UTF-8 before conversion and decoded back as UTF-8, so any language round-trips correctly. Tools built on raw btoa often corrupt this.
What is URL-safe Base64 and when do I need it?
It swaps + for - and / for _ and drops padding, so the result is safe inside a URL. JWTs use it. Decoding here accepts either variant automatically.
Is Base64 secure?
No. It is an encoding, not encryption — anyone can reverse it without a key. Never use it to protect anything.
Is my text uploaded?
No. Conversion happens in your browser and nothing is transmitted. Base64 payloads often contain tokens and keys, so this is not a minor detail.