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
Base64 examples
| Text | Base64 |
|---|---|
| Man | TWFu |
| hello | aGVsbG8= |
| any carnal pleas | YW55IGNhcm5hbCBwbGVhcw== |
| Café | Q2Fmw6k= |
| a | YQ== |
Formula
3 bytes become 4 characters from A-Z a-z 0-9 + /
How the base64 works
- Step oneChoose Encode or Decode.
- Step twoPaste your text or your Base64 string. Line breaks and spaces are ignored when decoding.
- 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.