/**/

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text instantly.

Output

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is commonly used to encode binary data for transmission over text-based protocols like HTTP, SMTP, and JSON — where binary characters could be misinterpreted or corrupted.

Important: Base64 is encoding, not encryption. The encoded data can be decoded by anyone without a key. Never use Base64 to protect sensitive information.

Common Use Cases

Use CaseDetails
Data URIs in HTML/CSSEmbed images as data:image/png;base64,...
HTTP Basic AuthCredentials encoded as username:password in Base64
JWT tokensHeader and payload use Base64Url variant
Email attachmentsMIME encoding for binary file attachments
JSON APIsEncode binary blobs for JSON-safe transmission

Frequently Asked Questions

Is Base64 encoding the same as encryption?

No. Base64 is encoding, not encryption. Anyone can decode it without a key. Use AES or similar for actual security.

When should I use Base64?

When embedding binary data in text formats: data URIs in HTML/CSS, credentials in HTTP Basic Auth headers, binary data in JSON APIs.

How is Base64 used in JWT tokens?

JWT uses Base64Url (replacing + with - and / with _) for header and payload, making tokens URL-safe.

Is Base64 safe for passwords?

No. Base64 is completely reversible. For passwords, use BCrypt, Argon2, or PBKDF2 hashing algorithms.

What is the overhead of Base64 encoding?

Base64 increases data size by approximately 33% because every 3 bytes of binary data become 4 Base64 characters.

Related Tools