Advertisement

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text. Supports text and file input, with a live preview for decoded images.

Drop a file here or click to upload for Base64 encoding
TxText Input
0 bytes
B6Base64 Output

How to Use the Base64 Encoder / Decoder

Select encode or decode mode, then type or paste your input. The output updates in real time. For URL and HTML encoding, check out the String Encoder/Decoder. Use the swap button to quickly reverse the operation — turn your encoded output back into the original text. The tool shows input byte size, output character count, and the percentage size increase from encoding.

What Is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It was designed to carry binary data across systems that only handle text, such as email (MIME attachments), JSON payloads, data URIs in HTML/CSS, and HTTP headers. Base64 is not encryption — it is a reversible encoding. Anyone can decode a Base64 string, so it should never be used to protect sensitive data. For secure hashing, use our Hash Generator instead. The encoding increases data size by approximately 33% because every 3 input bytes become 4 output characters.

Common Use Cases

Embed small images as data URIs in CSS or HTML to reduce HTTP requests. Encode binary files for transmission in JSON APIs. Decode Base64 strings found in API responses, JWTs, or email headers — use our JWT Decoder to inspect token payloads. Encode credentials for HTTP Basic Authentication headers. Convert binary configuration data for storage in environment variables or YAML files. The tool fully supports Unicode text through UTF-8 encoding.

Advertisement

Frequently Asked Questions

Related Tools