Motes Electronics

Base64 Converter

Encode text to Base64 or decode Base64 strings back to plain text. Useful for API authentication, data transfer, and configuration files.

Text to Encode

Base64 Output

Input Length
0
characters
Output Length
0
characters
Size Ratio
0%
output/input

About Base64

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used for:

  • Email attachments (MIME)
  • Basic HTTP authentication
  • Data URLs (embedding images in HTML/CSS)
  • Storing binary data in JSON/XML
  • JWT (JSON Web Tokens)

Base64 Character Sets

Type Characters Padding Use Case
Standard A-Z a-z 0-9 + / = General purpose
URL Safe A-Z a-z 0-9 - _ = (often omitted) URLs, filenames
MIME A-Z a-z 0-9 + / = Email attachments

Common Examples

Text Base64 Encoded
Hello WorldSGVsbG8gV29ybGQ=
MotesElectronicsTW90ZXNFbGVjdHJvbmljcw==
admin:passwordYWRtaW46cGFzc3dvcmQ=

Base64 Encoding Process

Base64 encoding works by:

  1. Taking 3 bytes (24 bits) of binary data
  2. Splitting them into 4 groups of 6 bits each
  3. Converting each 6-bit value to a character from the Base64 alphabet
  4. Adding padding (=) if the input length isn't a multiple of 3

Note: Base64 increases data size by approximately 33%. For example, 3 bytes become 4 characters.