Skip to content
QuickKit 100% free · no login

Home › Developer Tools › Base64 Encode & Decode

Base64 Encode & Decode

Runs in your browserFree · no sign-up

Paste text to encode it, or paste Base64 to decode it. Accented letters, emoji and other Unicode text are handled correctly.

Advertisement

What Base64 is

Base64 is a way to represent binary data using only 64 safe printable characters: the letters A to Z and a to z, the digits 0 to 9, plus and slash, with equals signs as padding. It was designed for systems that can carry text but not raw bytes, such as early email. Every three bytes of input become four characters of output, so Base64 makes data about 33% larger. You will meet it in data URLs, email attachments, HTTP basic authentication headers, JSON Web Tokens and configuration files that embed certificates or images.

It is encoding, not encryption

Base64 provides no secrecy at all. Anyone can decode it instantly, as this tool shows. Never treat a Base64 string as a protected password or secret. If you see credentials "hidden" in Base64, they are effectively in plain text. Use it only for transport formatting, and use proper encryption or hashing for security.

How this tool handles Unicode

The browser's built-in btoa and atob functions only deal with Latin-1 characters, so naively encoding "é" or an emoji fails or gives wrong results. This tool first converts your text into UTF-8 bytes, which is the standard in nearly all modern systems, and then encodes those bytes. When decoding, it turns the bytes back into text using strict UTF-8. If the Base64 contains bytes that are not valid text, for example an image file, the tool says so rather than showing garbled characters.

The URL-safe variant

Standard Base64 uses plus and slash, which have special meaning in URLs, and padding with equals. The URL-safe form (RFC 4648 section 5) replaces plus with a hyphen, slash with an underscore and usually drops the padding. It is what JWTs use. Tick the option when encoding. The decoder accepts both forms and restores missing padding automatically.

Troubleshooting

  • Invalid characters, such as spaces inside the data, are rejected, but line breaks and spaces between lines are ignored.
  • A length that leaves a single stray character cannot be valid Base64.
  • If the result looks like random symbols, the original was probably binary data, not text.

All work is done in your browser and nothing is uploaded.

Frequently asked questions

Is Base64 encryption?

No. Base64 is a reversible encoding that anyone can decode. It does not protect data.

Why is Base64 output longer than the input?

Three bytes become four characters, so the output is about one third larger, plus any padding.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / and omits = padding, so it can sit safely in URLs and filenames. JWTs use it.

Does it handle emoji and accented letters?

Yes. Text is converted to UTF-8 before encoding, and decoded the same way.

Why can’t I decode my Base64 as text?

It probably holds binary data such as an image or compressed file. The tool only shows data that is valid UTF-8 text.

More free tools