Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to readable text, with full Unicode support. Runs entirely in your browser — nothing you paste is uploaded, so it's safe for tokens and config snippets.

Result

How to use this calculator

  1. Choose Encode (text to Base64) or Decode (Base64 to text).
  2. Paste your input into the box.
  3. Press Convert — Unicode and emoji are handled correctly via UTF-8.

Formula used

3 bytes (24 bits) → 4 Base64 characters (6 bits each)

Base64 maps every 3 bytes of data onto 4 printable characters from a 64-symbol alphabet (A–Z, a–z, 0–9, +, /). This ~33% size increase is the price of making binary data survive text-only channels. The = padding fills incomplete final groups.

Example calculation

Worked example

Hello encodes to SGVsbG8=. The = signals that the final group was padded because "Hello" is 5 bytes, not a multiple of 3.

Emoji work too: the 🌍 becomes several Base64 characters because it's a 4-byte UTF-8 sequence under the hood.

What Base64 is for

Base64 isn't encryption — it's a way to represent any binary data using only text-safe characters, so it survives systems built for text: email attachments, JSON payloads, data URLs embedding images in CSS, JWT tokens, and API credentials. Anyone can decode it instantly, which is exactly the point.

The cost is size — output is about 33% larger than the input, since 6 bits of information ride in each 8-bit character. The common security mistake is treating Base64 as if it hides anything; a Base64-"encoded" password is plaintext to anyone who pastes it into a decoder like this one.

Why use this calculator?

Frequently asked questions

Is Base64 encryption?

No — it's encoding, fully reversible by anyone with no key. It makes binary data text-safe; it provides zero secrecy. Never use it to protect passwords or sensitive data.

Why does Base64 make files bigger?

It represents 3 bytes with 4 characters, a 4/3 ratio — about 33% larger. That overhead buys compatibility with text-only channels, which is often worth it for small payloads like inline images or tokens.

What are the = signs at the end?

Padding. Base64 works in groups of 3 bytes; when the input isn't a multiple of 3, one or two = characters pad the final group so the length stays a multiple of 4.

Related calculators