SeriesCalc Logo

SeriesCalc

Base64 Encoder

Encode plain text to Base64 format

Input Information

Result

Enter text and click Encode to convert to Base64

Base64 Encoder converts plain text into Base64 encoded format. Base64 is a binary-to-text encoding scheme that represents binary data using ASCII characters.

Base64 encoding is commonly used for transmitting data over media that handle text (like email, URLs, JSON) and for embedding images or other binary data in HTML/CSS.

Term Glossary

Base64
An encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). Used for handling data in text environments such as email attachments and data URIs.
Padding
The = character appended to make the Base64 output length a multiple of 4. Used when the original data is not evenly divisible into 3-byte units.

  1. 1

    Type text

    Enter the plain text you want to encode.

  2. 2

    Click encode

    Clicking the button converts the text into a Base64 string.

  3. 3

    Review the Base64 output

    Check the output, which uses A-Z, a-z, 0-9, +, /, and = characters.

  4. 4

    Copy the result

    Copy the encoded string for use in email, JSON, data URIs, and more.

Example 1 — Basic string

"hello" → aGVsbG8=

'hello' (5 bytes) encodes to aGVsbG8=. The trailing = is padding to complete the 3-byte grouping.

Example 2 — Two words

"Hello World" → SGVsbG8gV29ybGQ=

'Hello World' (11 bytes including the space) encodes to SGVsbG8gV29ybGQ=.

Example 3 — Korean text

"한글" → 7ZWY6rWt

Under UTF-8 '한글' is 6 bytes and encodes to 7ZWY6rWt. Since 6 bytes fill complete 4-character groups, no padding = is needed.

How Base64 Works:

  • Character Set: Uses 64 characters: A-Z, a-z, 0-9, +, /
  • Padding: = character(s) added to make the output length a multiple of 4.
  • Size Increase: Encoded output is approximately 33% larger than the input.

"Hello" → "SGVsbG8=" (4 bytes → 8 characters)

Tips:

  • Base64 is not encryption - it's just encoding. Anyone can decode it.
  • Common use cases: email attachments (MIME), embedding images in CSS/HTML, JWT tokens.
  • For secure data transmission, always use HTTPS and proper encryption on top of Base64.
  • The encoder handles Unicode/UTF-8 text properly.

QWhy is Base64 encoding needed?

Channels that only handle text — email, JSON, URLs — cannot carry raw binary data. Base64 converts binary into safe ASCII characters so it can travel through those channels without corruption.

QHow much does encoding increase the size?

Base64 encodes 3 bytes as 4 characters, so output grows by about 33%. For example, 3 bytes become 4 characters and 6 bytes become 8. Small inputs add 1–2 characters of padding.

QCan non-ASCII text like Korean be encoded?

Yes. Non-ASCII text like Korean is first converted to UTF-8 bytes, then encoded to Base64. Under UTF-8 '한글' is 6 bytes, so it becomes an 8-character Base64 string. Decoding interprets those bytes as UTF-8 to restore the original.

QWhat is the trailing = for?

It is padding that makes the Base64 output a multiple of 4. When the source is not a multiple of 3 bytes, one or two = characters are appended. For example, 'hello' (5 bytes) becomes aGVsbG8= with one =.

QHow is it used in data URIs?

To embed binary data like images directly in HTML or CSS, put the Base64 string after `data:image/png;base64,`. This includes the data in the document without a separate file request.

Related calculators