This tool allows you to encode image to base 64 string.
Select your image to convert
Image source for HTML
Image source for CSS
Base64 is a binary-to-text encoding scheme, it encodes binary data in plain text, Base64 represents binary data in an ASCII string format.
Base64 allows to transmit the data without loss or modification of the contents. It is useful for protocols that expect ASCII data.
Why to base64 encode images ?
Base64 encoded images become part of the html and displays without loading anything.
Base64 encoding images reduces the number of HTTP requests to download the webpage.
With base64 encoding you save HTTP requests!
But it makes file sizes roughly 33% larger than their original binary representations.
With HTTP/2, this solution is less relevant, as the multiplexing decreases the impact of these HTTP requests.