Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings back to readable text.

Encode & Decode

Share this tool:

Deep Dive: How Base64 Works

Base64 is not encryption; it is an encoding scheme designed to ensure data remains intact during transport. It takes binary data (like an image) and translates it into a set of 64 ASCII characters that are safe to send over text-based protocols like email (SMTP) and HTTP.

The 64 Characters

A-Z (26) + a-z (26) + 0-9 (10) + "+" and "/" = 64 characters

Does Base64 Increase Size?

Yes. Base64 encoding increases the file size by approximately 33%. This happens because every 3 bytes of binary data are converted into 4 characters of Base64 text. Use it for small icons or critical data, but avoid it for large video or audio files.

Frequently Asked Questions

Is Base64 secure?

No, Base64 provides zero security. It is "encoding," not "encryption." Anyone can decode it. Never use Base64 to hide passwords or API keys.

What is "URL Safe" Base64?

Standard Base64 uses `+` and `/`, which have special meanings in URLs. "URL Safe" Base64 replaces `+` with `-` and `/` with `_` to prevent errors when putting the string in a web address.

How do I fix "Invalid Length" errors?

Base64 strings must have a length divisible by 4. If your string is truncated, add `=` characters to the end until the length is a multiple of 4. This is called "padding."

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools