Base64 Encoder & Decoder – Free Online Base64 Tool

Base64 Encoder & Decoder

Encode
Decode
Input 0 chars
Output 0 chars
Copied!

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that converts data into printable ASCII characters. It is commonly used to transmit binary data over text-based channels like email, URLs, and APIs.

The name comes from using 64 different characters: A-Z, a-z, 0-9, plus (+), and forward slash (/). As a result, any binary data can be safely represented as a simple text string.

How to use this Base64 encoder and decoder

To encode text, select the “Encode” tab and paste your plain text. The tool instantly converts it to a Base64 string. Similarly, to decode, switch to the “Decode” tab and paste your Base64 string.

Additionally, you can use the “Swap” button to quickly switch between encoding and decoding. The tool auto-converts as you type, so results appear in real time.

Common use cases for Base64

Data URIs in web development allow you to embed small images or fonts directly in HTML or CSS. For example, a small icon can be Base64 encoded and placed inline, which eliminates an extra HTTP request.

API authentication often requires Base64 encoding. HTTP Basic Authentication, for instance, encodes the username and password as a Base64 string in the Authorization header.

Email attachments use Base64 to safely transmit binary files through text-based email protocols. Moreover, JSON Web Tokens (JWTs) use Base64url encoding for their header and payload sections.

Frequently asked questions

Is Base64 encryption?

No, Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string without a key. Therefore, you should never use Base64 to protect sensitive data. Use proper encryption like AES instead.

Does Base64 increase file size?

Yes. Base64 encoding increases data size by approximately 33%. This is a trade-off for the ability to transmit binary data as text. However, for small files like icons, the size increase is negligible.

Is my data safe with this tool?

Absolutely. All encoding and decoding happens locally in your browser. No data is ever sent to any server, which makes it completely safe for sensitive information.

Related developer tools

You might also find these tools helpful: the URL Encoder & Decoder for handling special characters in URLs, the Hash Generator for creating MD5 and SHA hashes, or the JSON Formatter for beautifying JSON data.

Scroll to Top