✦FancyText.dev

Base64 Encoder & Decoder

Paste Base64 to decode it into text, or type text to encode it. The decoder accepts standard and URL-safe Base64, strings with missing = padding, line breaks and data: URLs. If the input isn't valid Base64, it tells you why.

SGVsbG8gV29ybGQ=

About Base64 Encoder / Decoder

Base64 turns any data into plain text made of 64 safe characters: A–Z, a–z, 0–9, + and /. It takes three bytes at a time (24 bits) and writes them as four characters of six bits each. That makes the result about 33% bigger than the original, but it can travel through systems that only handle text, such as email.

When the input isn't a multiple of three bytes, = signs pad the end. One leftover byte gives two = signs and two leftover bytes give one. That is why "M" encodes to TQ==, "Ma" to TWE= and "Man" to TWFu with no padding at all.

Examples

Hello World → SGVsbG8gV29ybGQ= hi → aGk= I love you → SSBsb3ZlIHlvdQ== Man → TWFu café → Y2Fmw6k= 😀 → 8J+YgA==

Text is turned into UTF-8 bytes before encoding, so accents and emoji work. The é in café is two bytes and the emoji is four, which is why their Base64 is longer than the letters suggest.

Where you will meet Base64

Email attachments are sent as Base64, in lines of at most 76 characters. Web pages embed small images with data: URLs such as data:image/png;base64,… . Login tokens called JWTs are three Base64URL parts joined by dots, and the first two parts decode to readable JSON.

Base64URL is a variant for links and file names. It swaps + for - and / for _, and often drops the = padding. This decoder accepts both forms, so you can paste a JWT part or a URL value as it is.

Is Base64 safe?

Base64 is an encoding, not encryption. Anyone can decode it in a second, with no key. Never use it to hide a password or private data. Its job is to carry data safely through text-only systems, not to keep it secret.

If decoding gives a message about binary data, the Base64 holds something that isn't text, such as an image or a ZIP file. The decoding worked, but the bytes don't form readable characters.

Questions people ask

What is Base64 decoding?▼

Turning Base64 text back into the original bytes. Every four characters become three bytes, and the = padding at the end is removed.

How can I decode Base64?▼

Paste it into the box above and choose Base64 → Plain Text. On a Mac or Linux terminal, echo 'aGk=' | base64 --decode does the same thing.

Is Base64 safe to use?▼

It is safe for carrying data, but it gives no privacy. Anyone can decode it without a key, so don't use it to hide passwords or personal details.

What is an example of Base64?▼

"Hello World" in Base64 is SGVsbG8gV29ybGQ=. The = at the end is padding, because 11 bytes don't divide evenly into groups of three.

Why does my Base64 fail to decode?▼

Common causes are a character outside the Base64 set, or a string that was cut off when copying. The decoder above names the problem instead of returning nothing.

More Translators

Next step