Base64 Encode / Decode Calculator

Encode text to Base64 or decode Base64 back to plain text.

Result

Base64
SGVsbG8sIHdvcmxkIQ==
Export:

How Base64 works

Base64 takes binary data and rewrites it using a set of 64 safe characters: the letters A to Z and a to z, the digits 0 to 9, plus two symbols. It groups the input into chunks of three bytes (24 bits) and splits each chunk into four six-bit pieces, mapping each piece to one character.

Because four output characters represent three input bytes, encoded text is roughly a third larger than the original. When the input does not divide evenly into three, padding characters fill the gap.

When to use it

Base64 shines when you need to move binary or arbitrary text through a channel that only handles plain ASCII reliably.

  • Embedding small images or fonts directly in HTML or CSS as data URIs.
  • Carrying binary payloads inside JSON, XML or email bodies.
  • Passing values through URLs once they are made URL-safe.

Encoding is not encryption

Anyone can reverse Base64 instantly, including this tool. It scrambles nothing and hides nothing, so it must never be used to protect passwords, tokens or any sensitive data.

If you need confidentiality, use real encryption. Base64 only changes how data is represented, not who can read it.

Common mistakes

Decoding fails or returns garbage when the input is not valid Base64. Stray spaces, line breaks or missing padding can all break it.

Standard Base64 includes characters that have special meaning in URLs. For links, switch to a URL-safe variant or encode the result again before placing it in a query string.

Formula

encode: utf8 → base64;  decode: base64 → utf8

Frequently asked questions

Is Base64 encryption?
No. Base64 is encoding, not encryption — anyone can decode it. Do not use it to protect secrets.