Skip to main contentSkip to secondary navigation
HomeengineeringBase64

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text instantly. Supports text and file input with live encoding and one-click copy.

✓ Formula verified: January 2026

Base64

Results update instantly as you type

Enter Values

The Formula

Base64(text) = 64-char alphabet encoding

Base64 encodes binary and text data into a safe 64-character alphabet (A-Z, a-z, 0-9, +, /) for transmission over text-based protocols that might misinterpret binary data. It works by grouping input bytes into 24-bit chunks (3 bytes), splitting each chunk into four 6-bit values, and mapping each 6-bit value to one of 64 printable ASCII characters. If the input length is not a multiple of 3 bytes, = padding is added to make the output a multiple of 4 characters.

Variable Definitions

input

Input Text

The text to encode or the Base64 string to decode.

encoded

Encoded Output

Base64-encoded string (about 33% larger than input).

decoded

Decoded Output

Original text recovered from Base64 by reversing the encoding process.

How to Use This Calculator

  1. 1

    Select Encode mode to convert text to Base64, or Decode mode to convert Base64 back to plain text.

  2. 2

    Enter your input text in the text area — supports plain text, numbers, and special characters.

  3. 3

    The encoded or decoded output appears instantly as you type or paste.

  4. 4

    Use the Copy button to copy the result to your clipboard for use in code, emails, or configuration files.

  5. 5

    Character counts show the size difference: the encoded output is roughly 4/3 the size of the original due to Base64 overhead.

Base64 encodes 3 bytes into 4 ASCII characters using a 64-character alphabet, adding ~33% overhead.

Understanding the Concept

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format using 64 safe characters (A-Z, a-z, 0-9, +, /), with = used for padding. It is commonly used for embedding images directly in HTML or CSS as data URIs (data:image/png;base64,...), encoding email attachments via MIME, storing binary data in JSON or XML, and transmitting credentials in HTTP Basic Authentication headers. Each 3 bytes of input becomes 4 Base64 characters, adding approximately 33% overhead. Because Base64 uses only safe printable ASCII characters, it is immune to character encoding issues and transmission corruption from control characters that binary data might contain. A common variant, Base64URL, replaces + and / with - and _ and omits padding, making it safe for use in URLs and filenames.

Frequently Asked Questions

Related Calculators

Reviews

No reviews yet. Be the first to share your experience with Base64 Encoder / Decoder.

Write a Review

Your Rating *

0/1000

0/50

Related Calculators

Medical Disclaimer: The health and fitness calculators on this site are for informational and educational purposes only. They are not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider with any questions about your health.

Financial Disclaimer: The finance calculators on this site are for informational purposes only and do not constitute financial advice. Results are estimates based on the inputs provided and may vary. Consult a qualified financial advisor before making investment or financial decisions.

© 2026 TheCalcUniverse. All results are for informational purposes only.

Fast, free, and privacy-first.