calc-hub logocalc-hub.net

Base64 Encode / Decode

Encode any text or decode Base64-encoded strings. Base64 represents binary data as ASCII text using 64 characters (A–Z, a–z, 0–9, +, /).

How to use the Base64 Encode / Decode

  1. Enter your inputs into the Base64 Encode / Decode above.
  2. Results update instantly as you type — no submit button needed.
  3. Adjust any value to see how the result changes in real time.

The Base64 encoding process

Group input into 3-byte chunks (24 bits) → split into 4 × 6-bit groups → look up each in the Base64 alphabet

Each 6-bit group represents a digit in base 64. Input that doesn't divide evenly into 3 bytes is padded with = signs at the end. The encoded output is ~33% longer than the input.

Worked example

"Hello" → "SGVsbG8=". The 5-character string becomes 8 characters of Base64 (including 1 padding character). Decoding "TWFu" returns "Man".

Frequently asked questions

Is Base64 encryption?

No — it's encoding, not encryption. Anyone can decode Base64. It's used to safely transport binary data through text-only protocols (email, JSON), not to hide it.

Why do encoded strings end with =?

Padding. Base64 works on 3-byte groups; if your input length isn't divisible by 3, padding characters fill the last group. 1 byte short = "=="; 2 bytes short = "=".

Where is Base64 used?

Email attachments (MIME), data URLs in HTML/CSS (data:image/png;base64,...), JWT tokens, API keys, anywhere binary needs to fit in text-only contexts.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.