About the Base64 Encode / Decode
Base64 represents binary data as plain text, which is how images are embedded in CSS, how email attachments are sent and how many APIs exchange data. This tool encodes and decodes Base64 for both text and files.
It handles UTF-8 characters correctly and supports URL-safe Base64. Everything runs locally.
How to use the Base64 Encode / Decode
- Choose encode or decode.
- Paste text or upload a file.
- Click convert.
- Copy the result or download the decoded file.
Key features
- Text and file support
- UTF-8 safe
- URL-safe Base64
- Download decoded files
How Base64 works
Base64 takes binary data three bytes at a time and represents it as four characters from a 64-character alphabet of letters, digits, plus and slash. That is why encoded output is about 33 percent larger than the original. The equals signs at the end are padding that make the length a multiple of four.
URL-safe Base64 replaces plus and slash with minus and underscore so the result can be used in URLs and file names, which is the variant used in JSON Web Tokens.
Common uses
- Embedding small images in CSS or HTML as data URIs.
- Decoding Base64 strings found in API responses and emails.
- Encoding credentials for HTTP Basic authentication headers.
- Inspecting the payload part of tokens and configuration values.
Tips for the best results
- Only embed small images; large data URIs make pages slower.
- Never treat Base64 as a way to hide secrets; anyone can decode it.
- Check that decoded text uses UTF-8 when it contains accents or emojis, so characters display correctly.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding that anyone can decode. Do not use it to protect secrets.
Why is Base64 output larger?
Base64 uses about 33 percent more space than the original binary data.
What is URL-safe Base64?
A variant that replaces + and / with - and _ so the result can be used in URLs.
Why do I get strange characters when decoding?
The original data was probably a binary file, not text. Use the file option to download it instead.
Is my data uploaded?
No. Encoding and decoding happen in your browser.