Skip to content
CHARTOVANA

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to readable text, with full UTF-8 support. Everything runs in your browser.
Runs in your browser. Nothing is uploaded.

Text is encoded as UTF-8 first, so accents and emoji survive the round trip.

How to use the Base64 Encoder / Decoder

  1. Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Type or paste your text into the left box. The result appears on the right as you type.
  3. Use Copy to copy the result, or Clear to start again.

Examples

  • Hello encodes to SGVsbG8=.
  • café encodes to Y2Fmw6k=, because the é is encoded as UTF-8 bytes first.
  • 🚀 encodes to 8J+agA==. Decoding any of these Base64 strings returns the original text.

What Base64 is, and what it is not

How the encoding works

Base64 represents binary data with 64 safe characters: A–Z, a–z, 0–9, + and /. Every three bytes become four characters, and = is added as padding when the input length is not a multiple of three. The result is about a third larger than the original data, so it is meant for transporting data through text-only channels (email, JSON, URLs, configuration files), not for saving space.

UTF-8 text

This tool first converts your text to UTF-8 bytes, then encodes those bytes. That is why accented letters and emoji round-trip correctly: é is two bytes and 🚀 is four. When decoding, the bytes are read back as UTF-8; if they are not valid UTF-8 (for example because the Base64 held an image), the tool says so instead of showing replacement characters.

Not encryption

Base64 is an encoding, not a security measure. Anyone can decode it, so never use it to protect passwords, tokens or personal data. Use encryption for that instead.

Lenient decoding

Spaces and line breaks in the Base64 are ignored, and padding at the end may be omitted. Characters outside the Base64 alphabet, misplaced padding and impossible lengths are reported as errors.

Frequently asked questions

Is Base64 encryption?

No. Base64 is a reversible encoding that anyone can decode. It hides nothing and protects nothing; use encryption for confidential data.

Why is the encoded text longer than the original?

Every three bytes of input become four characters of output, so Base64 adds roughly 33% plus padding. That overhead is the cost of using only text-safe characters.

Why does decoding sometimes say the result is not valid UTF-8?

The Base64 was valid, but the bytes it represents are not text in UTF-8 (for example, they may be part of an image or a compressed file). This tool shows readable text, so it reports that case instead of displaying broken characters.

Is my text uploaded or saved?

No. Encoding and decoding run in your browser with JavaScript. Your text is never sent to a server and is not stored, so it is gone when you close or reload the page.

Last updated