Base64 Encoder / Decoder
Encode and decode text to/from Base64
About This Tool
What is Base64?
Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string using a set of 64 characters (A–Z, a–z, 0–9, +, /). It is defined in RFC 4648 and is widely used to encode data that needs to be stored or transferred over media designed to handle text.
How Base64 Works
Base64 divides the input data into groups of 3 bytes (24 bits) and splits them into 4 groups of 6 bits. Each 6-bit value is mapped to one of the 64 characters in the Base64 alphabet. If the input length is not a multiple of 3, padding characters (=) are added to the output.
Common Use Cases
Base64 is commonly used to embed images directly in HTML or CSS via data URIs, encode email attachments in MIME format, store complex data in JSON web tokens (JWT), and transmit binary data over text-based protocols like HTTP. Note that Base64 encoding increases data size by approximately 33%.