About the Base64 Encoder / Decoder
The Base64 Encoder converts text into Base64 and decodes Base64 back into readable text. Base64 represents binary data using only 64 safe characters (A–Z, a–z, 0–9, + and /), so it can travel through systems that only handle text: email attachments, JSON payloads, HTTP Basic authentication headers, data URLs for images and many configuration files. Developers use it constantly when debugging APIs and tokens.
How to Use the Base64 Encoder / Decoder
- Paste plain text to encode, or a Base64 string to decode.
- Choose Encode or Decode.
- Copy the result.
- If decoding fails, check that the string is complete and has not been cut off or wrapped.
Base64 Is Encoding, Not Encryption
Anyone can decode Base64 in a second, so it provides no security at all. Never use Base64 to “hide” passwords or API keys. If you need to protect data, use proper encryption (such as AES) or, for passwords, a slow hash like bcrypt or Argon2.
Size and Padding
Base64 output is about 33% larger than the original data, because every 3 bytes become 4 characters. The = or == at the end is padding that makes the length a multiple of four. A related variant called Base64URL replaces + and / with - and _ and often drops the padding; it is used in JWT tokens and URLs.
Examples
Hello encodes to SGVsbG8=. An HTTP Basic header for user admin and password secret is Authorization: Basic YWRtaW46c2VjcmV0, which is just Base64 of admin:secret, another reason to always use HTTPS. Small icons can be embedded in CSS as data:image/png;base64,....
Frequently Asked Questions
Why does my decoded text show strange characters?
The original data may not be text (for example an image or compressed file), or it may use a different character encoding than UTF-8.
Can I decode a JWT with this tool?
Each JWT part is Base64URL encoded. It is easier to use the JWT Decoder, which handles the URL-safe alphabet and shows the header and payload as formatted JSON.
Is Base64 safe for passwords?
No. It is reversible by anyone and offers no protection.
Why is the output longer than the input?
Base64 uses 4 characters for every 3 bytes, so output is roughly one third larger.