Skip to content
🔐

Base64 Encoder/Decoder

Encode or decode text to/from Base64 instantly.

Runs in your browser

Updated

Encode or decode a string

Type or paste text and press Encode to get Base64; paste Base64 and press Decode to get the original back. Copy puts the result on the clipboard. "Hello" encodes to SGVsbG8=, and decoding that returns "Hello".

Text is encoded as UTF-8

The text is converted to UTF-8 bytes before encoding, so emoji, Chinese, Japanese, Arabic, Hindi and curly quotes all survive the round trip. "Hello" still encodes to SGVsbG8=, and "héllo 😀 你好" encodes to aMOpbGxvIPCfmIAg5L2g5aW9. Decoding assumes the bytes are UTF-8 text: if they are not, the output says so instead of showing mojibake, which is why images and other binary files belong in the image tools rather than here.

Other boundaries

  • The standard alphabet is produced. URL-safe input using "-" and "_" is accepted and padded, and whitespace from wrapped Base64 is ignored.
  • No line wrapping at 76 characters, as MIME requires.
  • No file, image or data-URI encoding. Use the image to Base64 tool for files, or go the other way with Base64 to image.
  • Malformed Base64 shows an error rather than a partial decode.

Where you meet Base64

It appears in data URIs embedded in CSS and HTML, in Basic authentication headers, in email attachments and in JWT segments. The purpose is always the same: carry bytes through a channel that only accepts text. Decoding is just as common, whether to read what an API returned or to check what an image data URI actually contains.

Questions people ask

Does Base64 reduce size?

No. It grows data by about a third. Its purpose is moving binary content through text-only channels safely.

Is Base64 encryption?

No. Anyone can decode it, so it hides nothing.