Base64 Encode/Decode

Direction
ResultSGVsbG8sIFdvcmxkIQ==

This Base64 tool converts text to a Base64-encoded string and converts Base64 back to readable text. Base64 represents arbitrary bytes using only 64 printable ASCII characters, which makes binary or special-character data safe to embed in URLs, JSON, email, and HTML where raw bytes could be corrupted. Encoding and decoding are fully reversible, and the tool handles full Unicode by routing text through UTF-8 first.

How it works

  1. Pick a direction: Encode turns your text into Base64, while Decode turns a Base64 string back into text.
  2. For encoding, the input is first UTF-8 encoded so accented letters and emoji survive, then the bytes are mapped to the Base64 alphabet (A-Z, a-z, 0-9, + and /) with = padding.
  3. For decoding, the Base64 is reversed back to bytes and interpreted as UTF-8; if the input is not valid Base64 the tool reports an error instead of producing garbled output.

Worked examples

Encode the text "Hello, World!" to Base64.

  1. Choose the Encode direction and paste the text.
  2. Each group of three bytes becomes four Base64 characters; the final group is padded with = signs.
  3. The 13-character input produces a padded 20-character Base64 string.

Hello, World! encodes to SGVsbG8sIFdvcmxkIQ==

Decode the Base64 string SGVsbG8sIFdvcmxkIQ== back to text.

  1. Choose the Decode direction and paste the Base64 string.
  2. The padded string is converted from the Base64 alphabet back into the original bytes.
  3. The bytes are read as UTF-8 to recover the original characters.

SGVsbG8sIFdvcmxkIQ== decodes to Hello, World!

Frequently asked questions

Is Base64 a form of encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it instantly, so it provides no secrecy and should never be used to protect passwords or sensitive data.
Why is Base64 output longer than the original text?
Base64 represents every three bytes with four characters, so the encoded text is about one-third larger than the input, plus a little padding. This size cost is the trade-off for being safe to transmit as plain text.
Does it handle emoji and accented characters?
Yes. Text is converted to UTF-8 before encoding and back from UTF-8 after decoding, so multi-byte characters such as accents and emoji round-trip correctly.
What happens if I try to decode invalid Base64?
The tool catches the error and reports that the input is invalid rather than returning corrupted text. Check for stray spaces, missing padding, or characters outside the Base64 alphabet.