Convert text to Base64 and back, with full Unicode support and a URL-safe variant for tokens and query parameters.
Waiting for text
Text is converted to UTF-8 bytes first, so every script and emoji survives.
Paste text to encode
Any text, in any language. The result is safe to put in JSON, a header or a URL.
Base64 Encoder / Decoder runs entirely on your device — tokens and credentials are never uploaded.
You’re on the Free plan. Compare plans
Base64 turns arbitrary bytes into 64 printable characters, so data that would otherwise be mangled — an image, a certificate, a string full of control characters — can travel through channels that only handle text. It is an encoding, not compression and not encryption: the output is about a third larger than the input, and anyone can decode it.
The place most Base64 tools go wrong is Unicode. The browser's built-in btoa works on one byte per character, so it throws on anything outside Latin-1 and the popular workaround produces incorrect output for some inputs. This tool converts text to UTF-8 bytes first and encodes those, which is what the standard actually describes — so emoji, Japanese, Arabic and Cyrillic all survive the round trip intact.
Both alphabets are supported. Standard Base64 uses + and /, which have meanings of their own inside a URL; the URL-safe variant swaps them for - and _ and usually drops the trailing = padding. Decoding accepts either without being told which, along with missing padding and the line breaks that MIME-wrapped values arrive with.
When decoded bytes are not valid UTF-8 text — because the value was an image or a compressed file — that is reported plainly, with a hexadecimal preview, rather than rendered as a page of replacement characters.
No. Base64 is a reversible encoding that anyone can undo in a second — this tool does exactly that. It keeps binary data intact in transit; it does not keep it private.
Base64 represents every 3 bytes as 4 characters, so the output is roughly 33% larger, plus padding. That overhead is the price of being safe to put in text.
Yes. Text is converted to UTF-8 bytes before encoding, so every character in Unicode round-trips exactly. The browser's own btoa would throw on most of them.
The variant defined in RFC 4648 §5, which uses - and _ in place of + and /, and normally omits the = padding. JWTs and many APIs use it so values can be dropped into a URL unescaped.
Because the decoded bytes are not valid UTF-8 — the original was an image, an archive or some other binary payload. The first bytes are shown as hexadecimal so you can identify it from its signature.
No. Encoding and decoding happen in your browser. Base64 frequently carries Basic auth headers and session tokens, and none of it leaves your device here.