CalcTimer

Base64 Encoder

Encodes your text into Base64.

How to use the Base64 Encoder

  1. Paste or type the text you want encoded into the input box.
  2. The output box refills on every keystroke with the Base64 form of that text.
  3. Press the copy button to take the encoded string with you.

Your text passes through UTF-8 first

Base64 works on bytes and the browser encoder accepts only values up to 255, so the page turns your text into UTF-8 bytes before encoding them. That is why non-Latin characters cost more than a byte each: a Hangul syllable takes three and encodes to 7ZWc.

Length, padding and the one third overhead

Three bytes go in and four characters come out, so the result runs about a third longer than the input. Where the byte count is not a multiple of three, the tail is padded with equals signs to keep the length a multiple of four.

Input bytesOutput lengthPadding
14==
24=
34none
48==
68none

Frequently asked questions

Can it decode as well?

This page encodes only.

What is Base64 for?

Representing binary data as plain text so it can travel through channels that only handle text, such as email attachments, data URLs and JSON payloads.

Is Base64 a form of encryption?

No. It is a reversible encoding with no key, and anyone can turn it back in one step. Never use it to hide a password.

Can I paste the output straight into a URL?

Not as it stands. The alphabet includes plus and slash, which both mean something in a URL. URL-safe Base64 swaps them for minus and underscore.

Can I encode an image or a file here?

No. The page reads a text box and there is no file input, so a file needs a tool that can read its bytes directly.