Base64 Encoder & Decoder Online

Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 to text

Text->Base64 Encoding->Base64
13 chars
13
Input Length
0
Output Length
+100%
Size Change

About Base64

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to embed binary data in text-based formats like JSON, XML, or HTML.

Common Use Cases

  • Embedding images in CSS/HTML (data URIs)
  • Encoding binary data in JSON APIs
  • Email attachments (MIME encoding)
  • Storing binary data in text files

What is Base64 encoding and how does it work?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It works by taking groups of 3 bytes (24 bits) and splitting them into 4 groups of 6 bits, each mapped to one of the 64 characters. If the input length is not divisible by 3, padding characters (=) are added. Base64 increases data size by approximately 33% but ensures binary data can be safely transmitted through text-based protocols. Common uses include encoding email attachments (MIME), embedding images in HTML/CSS as data URIs, encoding authentication credentials in HTTP Basic Auth headers, and storing binary data in JSON or XML. Base64url is a URL-safe variant that replaces + with - and / with _, used in JWTs and URL parameters.

Built with care by Alpiaal