Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text.

Mode

Enter plain text to encode, or Base64 to decode (based on the mode above).

Scroll inside the box for long output; the copy button stays in view.

Formula used

Encoding (UTF-8):
  bytes   = UTF-8 encode of the input string
  base64  = base64(bytes)   // 3 bytes -> 4 chars, '=' padding to a multiple of 4

Decoding:
  bytes   = base64 decode of the input
  text    = UTF-8 decode of bytes

Worked example

Mode: Encode   Input: Hello

Result: SGVsbG8=

Switch to Decode with the same value and you get Hello back.

Frequently asked questions

What is Base64 used for?

Base64 turns binary data into plain text so it can travel through systems that only handle text, like email, JSON, or URLs. It is encoding, not encryption — anyone can decode it.

Is Base64 secure?

No. Base64 is reversible and provides no secrecy. Never use it to hide passwords or sensitive data; use proper encryption for that.

Why is my decoded text garbled?

The input was not valid Base64, or it was Base64 of non-text data such as an image. This tool decodes to UTF-8 text, so binary files will look like nonsense.

Does it handle Unicode and emojis?

Yes. Encoding uses UTF-8, so accents, Chinese characters, and emojis survive the round trip intact.