Base64 Codec

Input

--- OR ---
--- OR ---

Output - 0 Bits

What is Base64?

Base64 is an encoding scheme that uses 64 printable ASCII characters to represent binary data, which was first standardized in RFC 2045 in 1996. It is commonly used to securely transmit or store binary data that would otherwise contain non-printable characters in text protocols, and the most up-to-date standardized document can be found in RFC 4648.

Unlike binary data stored directly, Base64 converts binary data into a string consisting of only letters, numbers, and two symbols, ensuring that the data is transmitted and stored completely and reliably in the text system.

What can Base64 do?

In web pages or emails, convert small images, fonts, and even CSS files directly into Base64 encoding and embed them into the page to serve them directly on the page without additional HTTP requests.

<!-- HTML or Email -->
<img src="data:image/png;base64,iVBORw0KGgoAAAANSU ..." />

/* CSS */
@import url("data:text/css;base64,QGNoYXJzZXQgIlVURi04Ij ...")

@font-face {
    font-family: "MyFont";
    src: url("data:application/x-font-woff;base64,d09GRgABAAAAAAwMA ...")
}

You can also convert uploaded files to Base64 and store them in a text-only database.

Base64 can simply cryptographically obfuscate the original content, but it has no security at all ...

Learn more at MDN and Can I Use!