Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 to text. Supports UTF-8.
Output
About This Tool
Base64 encoding is a method of converting arbitrary binary data or text into a sequence of printable ASCII characters. It ensures that data remains intact without unexpected manipulation during transport across textual protocols such as HTTP or SMTP.
When to Use
- Embedding images directly into HTML/CSS files as data URIs (e.g., loading small icons to save HTTP requests).
- Encoding API credentials (Basic Authentication) in HTTP Headers.
- Storing binary data inside JSON payloads.
- Decoding parts of a JWT token to read its payload header.
Practical Examples
Basic Authentication"admin:password" becomes "YWRtaW46cGFzc3dvcmQ="
HTML Image embedding<img src="data:image/png;base64,iVBORw0KGgo..." />
Common Mistakes to Avoid
- Thinking Base64 is encryption. Base64 provides no security or cryptographic protection—anyone can decode it. Do not use it to hide passwords.
- Using standard Base64 in URL queries without replacing standard characters (+ and /) with URL-safe alternatives.
Frequently Asked Questions
Q. Why does the encoded string sometimes end with '='?A. The '=' is a padding character. Base64 encodes data in groups of 3 bytes. If the raw string isn't exactly a multiple of 3 bytes, padding is required to fill out the final block.
Q. Is Base64 secure?A. No. It is an encoding scheme designed for data transportation, not a hash or encryption algorithm.