Image To Base64

data-url

X

css

X
X

DataURI allows you to embed small files in HTML documents. You can use the img tag or CSS to embed the converted Base64 encoding, reducing HTTP requests and speeding up the loading time of small images. The file size after Base64 encoding is generally about 30% larger than the original file.

// Using Base64 in CSS
.box{  background-image: url("data:image/jpg;base64,/9j/4QMZR...");
}
            
// Using Base64 in HTML
<img 
src="data:image/jpg;base64,/9j/4QMZR...
" />