How to use the base64 encode / decode
- Paste plain text to encode, or a Base64 string to decode.
- Click Encode or Decode.
- Copy the output.
About this tool
Base64 turns binary or text data into plain ASCII characters, which is how tokens, email attachments and data URIs are usually carried. This tool encodes and decodes UTF-8 text correctly, including accented letters, Indian scripts and emoji, and accepts URL-safe Base64 with - and _ characters.
Examples
| Text | Base64 |
|---|---|
| Hello | SGVsbG8= |
| WidePit | V2lkZVBpdA== |
| admin:secret | YWRtaW46c2VjcmV0 |
Base64 reads the data three bytes at a time and writes four characters for each group. When the data does not fill the last group, one or two = signs are added as padding, which is why some results end with = or ==.
Why the result is bigger
Four output characters carry three bytes of input, so Base64 text is about 33% larger than the original. That is the price for using only letters, digits, + and /, which survive email systems, JSON strings and URLs that would mangle raw bytes.
Where you will meet it
- Data URIs, such as images embedded directly in CSS or HTML.
- HTTP Basic authentication, where the header carries Base64 of username:password. That is encoding, not protection, so only use it over HTTPS.
- Email attachments, which are Base64-encoded inside the message.
- JWT tokens, which use the URL-safe variant of Base64.
Base64 is not encryption
Anyone can decode Base64 in a second, as this page shows. Never use it to hide passwords, keys or personal data. If you need secrecy, use real encryption.
URL-safe Base64 and common errors
The URL-safe form swaps + and / for - and _ and often drops the = padding. This tool accepts both forms when decoding. If decoding fails, the usual causes are stray spaces or line breaks (email systems wrap lines at 76 characters), a missing character from copying, or text that was not Base64 to begin with. This tool handles text, so for files use a command-line tool or a file-based converter.
Frequently asked questions
Does it support emoji and non-English text?
Yes. Text is handled as UTF-8, so accented characters, Indian scripts, and emoji round-trip correctly.
Can it decode URL-safe Base64?
Yes. The - and _ characters are converted automatically before decoding.
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it.
Why does Base64 sometimes end with equals signs?
They are padding that fills the last group of four characters. They carry no data.
Can I decode Base64 into an image?
Not here, because this tool decodes to text. If the Base64 begins with data:image, it is a data URI that a browser can display directly.