One Calculator Logo One Calculator
Everyday Tools • Formulas shown

Base64 Encode and Decode

Quick Answer

Base64 turns binary data into 64 safe ASCII characters, using 3 bytes of input for every 4 characters of output. The text “Hello, One Calculator!” encodes to SGVsbG8sIE9uZSBDYWxjdWxhdG9yIQ==. The = signs pad the output to a multiple of 4.

Result

Base64: SGVsbG8sIE9uZSBDYWxjdWxhdG9yIQ==

Input length22 characters
Output length32 characters
Step-by-step calculation
  1. Base64 represents bytes using 64 printable characters (A–Z, a–z, 0–9, + and /).
  2. Text is converted to UTF-8 bytes first, so accents and emoji work.

Base64 is an encoding, not encryption. Anyone can decode it. Processing happens in your browser.

About the Base64 Encode and Decode

Choose encode or decode and paste your text. The tool handles non-English characters and emoji by encoding the text as UTF-8 first.

Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect secrets. Your text is processed locally in your browser.

How to Use the Base64 Encode and Decode

  1. Choose encode or decode.
  2. Paste the text.
  3. Read the output and copy it.

Formula and Method

Output length

length = 4 × ⌈bytes ÷ 3⌉

Padded with = signs.

Worked Example

Encoding a greeting

Input: Hello, One Calculator!

  • Convert the text to UTF-8 bytes
  • Group into 6-bit values and map to the Base64 alphabet

Result: SGVsbG8sIE9uZSBDYWxjdWxhdG9yIQ==

Frequently Asked Questions

Is Base64 encryption?

No. It is reversible by anyone and gives no security.

Why does it end with = signs?

Padding fills the final group to four characters.

Where is Base64 used?

In email attachments, data URLs, JSON web tokens and HTTP basic authentication.

Related Calculators

All Everyday & Other Calculators →

Sources and Further Reading

Accuracy and Scope

Results follow the formulas and scales stated on each page. Institutions, vehicles and circuits differ, so check against your own rules and equipment. See our full disclaimer.