C
All Tools
🔒

Base64 Encoder / Decoder

Encode text to Base64 and decode Base64 strings back to plain text. Fully supports Unicode.

Base64 is an encoding scheme that converts binary data into a text string using 64 safe ASCII characters (A-Z, a-z, 0-9, +, /). It is essential for transmitting binary data over text-based channels: embedding images in HTML/CSS (data URIs), encoding email attachments (MIME), storing binary data in JSON, and encoding JWT tokens and API keys. This encoder and decoder handles Unicode text correctly, converting between plain text and Base64 in both directions.

📋 How to Use This Calculator

Select Encode or Decode with the toggle. To encode: type or paste any text (including Unicode characters like accented letters, Chinese characters, or emoji) and click Encode. The output is the Base64 representation. To decode: paste a Base64 string (it should only contain A-Z, a-z, 0-9, +, /, and = padding characters) and click Decode. The original text is restored. Whitespace in the Base64 input is automatically ignored, so you can paste multi-line Base64 from email headers or certificates.

💡 Key Facts & Information

Base64 works by converting every 3 bytes of input into 4 Base64 characters (a 4/3 overhead, making Base64-encoded data about 33% larger than binary). The 64 characters used are A-Z (26), a-z (26), 0-9 (10), + (1), / (1), with = used as padding when the input length is not a multiple of 3. URL-safe Base64 replaces + with - and / with _ to make it safe in URLs without percent-encoding (used in JWT tokens). This tool handles standard Base64 and correctly encodes Unicode text by first converting to UTF-8 bytes before Base64-encoding, ensuring multi-byte characters are handled properly.

Frequently Asked Questions

Disclaimer: The results provided by this calculator are for informational and educational purposes only. They do not constitute financial, medical, or legal advice. Always consult a qualified professional before making financial or health decisions. Actual results may vary based on individual circumstances.

⚙️ More Developer Tools Tools

View all Developer Tools tools →