Base64 Encoder and Decoder

Convert text to Base64 encoding or decode Base64 strings back to original text format.

How to Use the Base64 Converter?

Enter your text or Base64 string and choose to encode or decode it.

What Is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters. It was originally designed to allow binary data (images, files, encrypted payloads) to be safely transmitted over text-based protocols like email (SMTP) and HTTP, which historically could only handle 7-bit ASCII. The name "Base64" reflects the 64-character alphabet used: A–Z (26), a–z (26), 0–9 (10), and two additional characters (+ and /).

How Base64 Encoding Works

Base64 converts every 3 bytes (24 bits) of binary data into 4 Base64 characters (each representing 6 bits). Here is the step-by-step process:

  1. Split the input data into groups of 3 bytes (24 bits)
  2. Divide each 24-bit group into four 6-bit chunks
  3. Map each 6-bit value (0–63) to its corresponding Base64 character
  4. Pad with = characters if the input length is not divisible by 3. One remaining byte produces == padding; two remaining bytes produce =

Because 3 bytes become 4 characters, Base64-encoded data is always approximately 33% larger than the original binary data.

Base64 Character Table

CharactersValuesCount
A–Z0–2526
a–z26–5126
0–952–6110
+621
/631
=Padding

Base64 Variants

VariantExtra CharactersPaddingUse Case
Standard (RFC 4648)+ /= requiredEmail (MIME), general encoding
URL-Safe (RFC 4648 §5)- _OptionalURLs, filenames, JWTs
MIME (RFC 2045)+ /= requiredEmail attachments (76-char line wrap)

Common Use Cases

Base64 Is Not Encryption

A common misconception is that Base64 "encrypts" data. Base64 is encoding, not encryption. Anyone can decode a Base64 string instantly — there is no key, no secret, and no security. Never use Base64 to protect sensitive data like passwords, API keys, or personal information. Use proper encryption (AES-256, RSA) or hashing (bcrypt, Argon2) instead.

Base64 in Different Languages

Frequently Asked Questions — Base64 Encoder & Decoder

Written and reviewed by the FreeBytes Editorial Team · Last updated: June 2026