← Back to Tools

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 strings to text instantly and securely.

Text Input
Result

What is Base64?

Base64 is a binary-to-text encoding scheme. It represents binary data (like images or files) in an ASCII string format. This is commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with text.

Common uses include embedding images directly into HTML/CSS, sending email attachments, and encoding data for APIs (like Basic Auth headers).

How does it work?

Base64 encoding takes input data (binary or text) and breaks it into 6-bit groups. Each 6-bit group is then mapped to a character from a set of 64 characters (A-Z, a-z, 0-9, +, /). Because 6 bits can represent 64 values (2^6), this character set is sufficient.

Frequently Asked Questions

Is my data sent to a server?

No. All encoding and decoding happens directly in your web browser using JavaScript. No data leaves your devise.

Why does the output end with '='?

The '=' characters at the end of a Base64 string are padding characters. They are added to ensure that the length of the Base64 string is a multiple of 4, which is required by the encoding standard.

Does it support UTF-8 characters?

Yes! Our tool correctly handles special characters (like emojis or accents) by first ensuring the string is properly escaped before encoding, avoiding common "latin1" errors found in older tools.