Skip to content
b64codec

About

b64codec.com was created and is maintained by the YouTube channel The Seasoned Programmer. Questions or suggestions? Email info@the-seasoned-programmer.com.

Every tool on this site runs entirely in your web browser. Your text and files are never sent to a server.

What is Base64?

Base64 is a binary-to-text encoding scheme, standardised in RFC 4648, that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It lets you carry images, files and other binary data through systems that only handle text, such as email, JSON, XML, URLs and HTML.

How Base64 is used in HTML

HTML

<img
  src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
  alt="Red dot"
/>

CSS

.logo {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0i...");
}

Benefits

Drawbacks