Handitab

Base64 Encode

Encode any text to a Base64 string from its UTF-8 bytes, with an optional URL-safe alphabet that drops the padding characters.

About Base64 Encode

Base64 is an encoding that represents binary data with 64 ASCII characters (A to Z, a to z, 0 to 9, plus, and slash), defined in RFC 4648. This tool converts your text to UTF-8 bytes first and then encodes them, so non-Latin characters survive a round trip. The URL-safe option swaps plus and slash for hyphen and underscore and removes the padding. Output is about 33 percent larger than the input.

Also known as: Base64 Encoder, Base-64 Encode a String.

How to use Base64 Encode

  1. Type or paste into the "Input text" box, or press "Use example" to try it with sample data.
  2. Set "Direction" and "URL-safe variant" if the defaults do not fit.
  3. The result appears below and updates as you type.
  4. Copy the result with the copy button, or download it as a file where that is offered.

Questions about Base64 Encode

Is Base64 a form of encryption?

No. Base64 is a reversible encoding with no key, so anyone can decode it. It exists to move binary data through text-only channels such as email, JSON, or data URLs, not to keep content secret.

Why does Base64 output end with one or two equals signs?

Base64 works on groups of three bytes. When the input length is not a multiple of three, the last group is padded with one or two equals signs so the output length stays a multiple of four characters.

Runs in your browser. Page last updated .

More encoding and data tools

All 28 encoding and data tools