Base64 Encoder / Decoder

Encode and decode Base64 in both directions, with correct handling of Unicode and emoji and a URL-safe variant that swaps the problematic characters. Everything runs locally in your browser, so nothing you paste is transmitted.

Base64 is not encryption

This is worth stating plainly because it is misused constantly. Base64 is a reversible encoding with no key. Anyone who sees the string can decode it in a second. It exists so binary data can travel through channels that only accept text - email bodies, JSON fields, data URIs - not to keep anything private. Never use it to protect a credential.

Why it makes data bigger

Three bytes of input become four output characters, because each character carries only six bits. That is a 33% increase, plus up to two padding characters. It is the price of restricting yourself to 64 characters that survive any text transport intact.

Unicode and the URL-safe variant

The browser's btoa throws on any character above U+00FF, which is why so many simple Base64 tools break on accents and emoji. This one encodes to UTF-8 bytes first, so any text works. The URL-safe variant swaps + for - and / for _ and drops the padding, because those characters have their own meaning in a URL. It is what JSON Web Tokens use.

Frequently asked questions

Is Base64 encryption?

No, and this matters. Base64 is a reversible encoding with no key, so anyone can decode it instantly. It exists to move binary data safely through text-only channels, not to hide anything. Never use it to protect a secret.

What is URL-safe Base64?

A variant that replaces + with - and / with _, because the standard characters have special meaning in URLs. Padding with = is often dropped too. It is what JSON Web Tokens use.

Why does Base64 make data bigger?

It packs 3 bytes into 4 characters, so output is about 33% larger than the input, plus padding. That is the cost of restricting yourself to a safe character set.

Related tools

Steuervergleich Kanton Zürich — Gemeindesteuern vergleichen (Deutsch)