Base64 Encoder & Decoder
Convert text to Base64 and vice versa instantly.
Text to Base64
Base64 to Text
What is Base64?
Base64 is a classification of binary-to-text encoding schemes that represent binary data in an ASCII string format. It is commonly used to embed image data in HTML or CSS files, or to send data across channels that only support text.
How to use the Base64 tool
- Encode: type or paste text in the left “text” box. The Base64 version appears instantly and can be copied.
- Decode: paste a Base64 string in the decode box to see the original text. If the input is not valid Base64, the tool tells you.
Both directions support UTF-8, so accented letters, Hindi or other non-Latin scripts and emoji round-trip correctly.
What Base64 is (and isn't)
Base64 is a way to represent any data using only 64 “safe” characters: A–Z, a–z, 0–9, + and /, with = used as padding. Every 3 bytes of input become 4 characters of output, so Base64 text is about 33% larger than the original. It exists so that binary data or special characters can travel safely through systems that were designed for plain text, such as email, URLs, JSON and HTTP headers.
Base64 is not encryption. Anyone can decode it instantly, so never use it to “hide” passwords, API keys or personal data. If you need confidentiality, use real encryption.
Where you'll see Base64
- Email attachments (MIME encoding).
- Data URLs that embed small images directly in HTML or CSS:
data:image/png;base64,… - HTTP Basic authentication, which sends
username:passwordBase64-encoded. That is why it must only be used over HTTPS. - JSON Web Tokens (JWTs), whose header and payload are Base64URL-encoded. Decoding them shows their contents, which is why JWTs should not carry secrets.
Base64 vs Base64URL
Standard Base64 uses + and /, which have special meanings in URLs. The Base64URL variant replaces them with - and _ and often drops the = padding. If a token from a URL or JWT fails to decode here, replace - with + and _ with /, then add = until the length is a multiple of 4.
Frequently asked questions
Why does my decoded text look garbled?
The Base64 probably encodes binary data (like an image or a compressed file) rather than text, or it was encoded from a non-UTF-8 character set.
Is my data uploaded?
No. Encoding and decoding use your browser's built-in functions and nothing is sent to a server.