How to Use the Base64 Encoder
- Enter your textType or paste plain text to encode, or paste a Base64 string to decode.
- Choose Encode or DecodePress Encode to turn text into Base64, or Decode to turn Base64 back into readable text.
- Check the error if there is oneInvalid Base64 shows a friendly error explaining the problem, instead of a blank or garbled result.
- Copy the resultUse Copy Output to take the result into an email, config file, API request or message.
What Base64 Is and Why It Exists
Base64 is a way to represent any bytes, including text, images and files, using only 64 safe characters: capital and small letters, digits, plus and slash, with equals signs as padding at the end. Computers often need to send binary data through systems that only handle plain text safely, such as email headers, web addresses, JSON fields and configuration files. Raw bytes in those places could be corrupted, misread or rejected, so Base64 translates them into text that survives the journey unchanged. The trade-off is size: Base64 output is about one third larger than the original data, because three bytes become four characters. That is acceptable for tokens, small images and short strings, but wasteful for very large files, which is why Base64 is not used for streaming video or large downloads.
Why Unicode Needs Special Care
A common bug in simple Base64 tools is that they break on non-English text. The old browser functions btoa and atob only handle Latin characters, so a word like café, a name in Urdu or Greek, or an emoji can produce an error or garbage. This tool avoids that bug completely by first converting your text to UTF-8 bytes with a TextEncoder, encoding those bytes, and reversing the process with a TextDecoder on decode. That means Hola, Καλημέρα, مرحبا and a smiling emoji all round-trip correctly: encode them, decode the result, and you get exactly the original text back. If another tool gives you broken characters for accented or non-Latin text, it almost certainly used bare btoa and atob without UTF-8 handling, and you should switch to a Unicode-safe tool like this one.
Common Uses and a Security Warning
- Data URLs: small images and icons are often embedded directly in web pages as Base64, so a page needs no separate image file.
- API tokens and basic auth: usernames, passwords and tokens are sometimes Base64-encoded in headers, but this is not encryption and must always travel over HTTPS.
- Email attachments: email systems encode attachments in Base64 so binary files can travel through text-only mail servers.
- Config and testing: developers encode short strings to test APIs, store small blobs in JSON, and compare values without worrying about special characters.
Privacy and Limits
Base64 is encoding, not encryption. Anyone who sees a Base64 string can decode it in seconds, so never use it to hide a password, a secret key or private information, and never treat it as secure. This tool runs entirely in your browser, so your text is never uploaded or stored, but the output itself is still readable by anyone you share it with. The tool accepts standard Base64 and the URL-safe variant that uses minus and underscore instead of plus and slash, and it tolerates line breaks and missing padding, which makes it forgiving with strings copied from emails. Very large inputs may be slow in a browser tab, so for multi-megabyte files use a desktop tool instead.