Other calculators

Base64 encode and decode

Convert text to Base64 and back. Works with accents and emoji (UTF-8).

Everything is processed in your browser: nothing is sent to the server.

What does it do?

Encodes text to Base64 and decodes Base64 to text, with support for accents and emojis (UTF-8) and the "URL-safe" variant.

Why does it matter?

Base64 is everywhere: in Basic authentication headers, JWT tokens, certificates, email and many APIs. To see what a token contains or build a header by hand, you need to encode and decode quickly without character mix-ups.

How does it work?

The text is first converted to UTF-8 bytes, and every 3 bytes are written as 4 characters from a 64-symbol alphabet (letters, digits, "+" and "/"). The URL-safe variant uses "-" and "_" instead of "+" and "/". Everything is processed in your browser: what you type is never sent to any server.

How to read the result

"=" at the end
Padding to complete the last group. The URL-safe variant often leaves it out.
Decoding error
The text has non-Base64 characters or a part is missing.

What is it for?

Frequently asked questions

Is Base64 a form of encryption?

No. Anyone can decode it. Never use it to protect passwords or sensitive data.

Why is the encoded text longer?

Because every 3 bytes become 4 characters: the result is about 33% larger.

Is it safe to paste a token here?

Yes: the conversion happens in your browser and nothing is sent to the server.