Skip to content

Base64 Encode and Decode

Encode text as Base64 (standard or URL-safe) or decode a Base64 string back into text.

Base64
Choose encode or decode. Nothing leaves this page.

Result
Result
SGVsbG8sIHdvcmxkIQ==
13
UTF-8 bytes

Private: Everything runs in this page. Nothing you type is sent anywhere or saved.

On this page
  1. Base64 examples
  2. Formula
  3. How the base64 works
  4. What this tool does not do
  5. Frequently asked questions
  6. References
  7. Related tools

Base64 examples

TextBase64
ManTWFu
helloaGVsbG8=
any carnal pleasYW55IGNhcm5hbCBwbGVhcw==
CaféQ2Fmw6k=
aYQ==

Formula

3 bytes become 4 characters from A-Z a-z 0-9 + /

How the base64 works

  1. Step oneChoose Encode or Decode.
  2. Step twoPaste your text or your Base64 string. Line breaks and spaces are ignored when decoding.
  3. Step threeCopy the result.

What this tool does not do

  • Base64 is an encoding, not encryption: anyone can reverse it, so it hides nothing.
  • It encodes text as UTF-8; it does not encode files or images.
  • It does not check that the decoded bytes make sense as text.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 only changes how data is written, and anyone can decode it. Never use it to hide a password.

What does the equals sign at the end mean?

It is padding that fills the last group of four characters. The URL-safe option leaves it out.

Why does decoding sometimes fail?

A Base64 string may only contain A-Z, a-z, 0-9, plus and slash (or minus and underscore in the URL-safe form), and its length must fit the format.

References