Base64 encode & decode
Encode text to Base64 or decode Base64 back to text, with full UTF-8 support.
How to use the base64 encode / decode
Paste input
Plain text or Base64.
Encode or decode
One click.
Copy
Copy the result.
What is Base64 encoding?
Base64 represents binary or text data using only 64 safe characters: A to Z, a to z, 0 to 9, plus and slash, with equals signs as padding. It lets data travel through systems that only handle plain text, such as email and JSON.
Every 3 bytes of input become 4 characters of output, so Base64 is about 33 percent larger than the original.
Where is Base64 used?
- Data URIs that embed small images directly in HTML or CSS
- Email attachments, through the MIME standard
- The header and payload sections of JSON Web Tokens
- HTTP Basic authentication headers
- Storing binary data in JSON or XML
Is Base64 secure?
No. Base64 is an encoding, not encryption, and anyone can decode it instantly. Never use it to hide passwords or secrets.
This tool encodes and decodes text with full UTF-8 support, so accented letters and emoji round-trip correctly. A URL-safe variant exists that swaps plus and slash for dash and underscore, which you can produce by replacing those characters after encoding.
Examples
| Text | Base64 |
|---|---|
| abc | YWJj |
| hello | aGVsbG8= |
| Hello, World! | SGVsbG8sIFdvcmxkIQ== |
Base64 compared with other encodings
| Encoding | Characters used | Size increase |
|---|---|---|
| Base64 | A–Z, a–z, 0–9, + and / | About 33% |
| URL-safe Base64 | Replaces + and / with - and _ | About 33% |
| Hexadecimal | 0–9 and a–f | 100% |
Base64 Encode / Decode FAQ
Free, private and browser-based. Your data never leaves your device.
What is Base64?
An encoding that represents binary data as ASCII text, often used in emails, data URLs and APIs.
Is Base64 encryption?
No. It is encoding, not encryption. Anyone can decode it.
How do I decode Base64?
Paste the Base64 text into the box and click Decode. If the text is not valid Base64, the tool tells you instead of producing garbage.
Why does Base64 sometimes end with equals signs?
Base64 works in groups of three bytes. When the input is not a multiple of three, one or two equals signs are added as padding so the output length is a multiple of four. This is normal.
Can I encode images or files here?
This tool encodes and decodes text. To embed an image as a Base64 data URI, you need a tool that reads the file’s raw bytes.
Is Base64 case-sensitive?
Yes. Uppercase and lowercase letters are different characters in Base64, so changing the case of encoded text changes or breaks the data it represents.