What Base64 is
Base64 is a way to represent binary data using only 64 safe printable characters: the letters A to Z and a to z, the digits 0 to 9, plus and slash, with equals signs as padding. It was designed for systems that can carry text but not raw bytes, such as early email. Every three bytes of input become four characters of output, so Base64 makes data about 33% larger. You will meet it in data URLs, email attachments, HTTP basic authentication headers, JSON Web Tokens and configuration files that embed certificates or images.
It is encoding, not encryption
Base64 provides no secrecy at all. Anyone can decode it instantly, as this tool shows. Never treat a Base64 string as a protected password or secret. If you see credentials "hidden" in Base64, they are effectively in plain text. Use it only for transport formatting, and use proper encryption or hashing for security.
How this tool handles Unicode
The browser's built-in btoa and atob functions only deal with Latin-1 characters, so naively encoding "é" or an emoji fails or gives wrong results. This tool first converts your text into UTF-8 bytes, which is the standard in nearly all modern systems, and then encodes those bytes. When decoding, it turns the bytes back into text using strict UTF-8. If the Base64 contains bytes that are not valid text, for example an image file, the tool says so rather than showing garbled characters.
The URL-safe variant
Standard Base64 uses plus and slash, which have special meaning in URLs, and padding with equals. The URL-safe form (RFC 4648 section 5) replaces plus with a hyphen, slash with an underscore and usually drops the padding. It is what JWTs use. Tick the option when encoding. The decoder accepts both forms and restores missing padding automatically.
Troubleshooting
- Invalid characters, such as spaces inside the data, are rejected, but line breaks and spaces between lines are ignored.
- A length that leaves a single stray character cannot be valid Base64.
- If the result looks like random symbols, the original was probably binary data, not text.
All work is done in your browser and nothing is uploaded.