Encode
Decode
Plain Text
Base64

About Base64 Encoding

Base64 is a binary-to-text encoding scheme defined in RFC 4648. It represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /) plus = for padding, making it safe to transmit through text-based protocols.

What is Base64?

  • Binary-to-text encoding - converts binary data into printable ASCII characters
  • 6 bits per character - each Base64 character represents 6 bits of data
  • ~33% size increase - 3 input bytes become 4 output characters
  • Not encryption - anyone can decode it without a key

Base64 vs Base64URL

Feature Standard Base64 Base64URL
62nd character+-
63rd character/_
Padding= (required)Usually omitted
URL-safeNoYes
Used inEmail (MIME), data URIsJWT tokens, URL parameters

Common Uses

  • Data URIs - embedding images and fonts directly in HTML and CSS
  • Email attachments - MIME encoding for binary attachments in email
  • JWT tokens - header and payload are Base64URL-encoded
  • API authentication - HTTP Basic Auth encodes credentials in Base64