Base64 Encoder / Decoder

Type or paste text to encode it to Base64, or paste Base64 to decode it back to readable text. Full Unicode (UTF-8) is handled correctly, and everything runs in your browser.

Enter text or Base64 and press Convert.

How Base64 works

Base64 encodes binary or text data using only 64 printable characters (A–Z, a–z, 0–9, + and /), so it can travel safely through systems that expect plain text — email, URLs, JSON, data URIs. It works by taking three bytes (24 bits) at a time and splitting them into four 6-bit groups:

3 bytes (24 bits) 4 × 6-bit groups 4 Base64 chars

Because 6 bits can hold 64 values, each group maps to one Base64 character. When the input isn't a multiple of three bytes, = padding fills the end. The result is about 33% larger than the original — the trade-off for being text-safe.

Worked example

Encoding the three letters "Cat" (ASCII 67, 97, 116):

Bits: 01000011 01100001 01110100 (24 bits).
Regroup: 010000 110110 000101 110100 → 16, 54, 5, 52.
Map: those indexes give Q2F0.

Unicode and common uses

Plain btoa only handles Latin-1, so this tool first converts text to UTF-8 bytes before encoding, which means emoji and accented characters round-trip correctly. Base64 is everywhere: embedding small images as data: URIs, encoding binary attachments, Basic HTTP authentication, and storing tokens. It is encoding, not encryption — anyone can decode it, so never use it to hide secrets.

Tip: to make text safe specifically for a URL query string, use the URL encoder / decoder instead.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 is reversible encoding, not encryption — anyone can decode it instantly. It exists to make binary data safe to send as text, not to keep it secret. Never use it to protect passwords or sensitive data.

Why does Base64 make data bigger?

Because it represents every 3 bytes with 4 characters, the output is roughly 33% larger than the input. That size cost is the price of being able to pass data safely through text-only channels.

Does it handle emoji and accents?

Yes. The tool encodes text as UTF-8 before converting, so emoji, accented letters and other Unicode characters encode and decode correctly without corruption.

What are the = signs at the end?

They're padding. Base64 works in blocks of four characters, so when the input length isn't a multiple of three bytes, one or two = signs are added to complete the final block.

MB
Mustafa Bilgic · Editor, Calcool
Encoding uses the browser's btoa/atob with UTF-8 conversion. See the MDN Base64 reference. Everything runs in your browser — nothing you enter is uploaded, logged or stored.

Related calculators