Our online Converter will help you encode/convert any image to Base64.
This is the app you need if you want to place the image directly in the code of the page or document, in this case, you must convert the desired image into Base64 string and the result to insert in either the page itself using tag to display the images (<img> elements), either in the style file (CSS background).
The convenience of this method is undeniable, and its main advantage in web development is that you do not need separately to place the image in the directory and then display it on the page, because Base64-you can do without it and do everything in a single file - which is very convenient.
Example of using Base64 to output the image:
1). The output image using the HTML tag (<img>).
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAo="/>
2). Image output using styles (CSS).
div.photo {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAo=") repeat-x; width:100%; height:10px;}
Now in HTML you can output using <div id="photo" width="10" height="10"></div>
Base64 is a standard encoding binary data using only 64 ASCII characters, the basic alphabet of the encoding contains a text-digital Latin characters A-Z, a-z and 0-9 (62 characters) and 2 additional characters depending on the system implementation, each original 3 bytes are encoded with 4 characters (an increase of 1⁄ ₃ ơ).
You can encode/convert image of any size and extension (.jpg .jpeg .tif .tiff .png .gif .bmp .dib) to Base64.
As a result, you will receive your image in a string Base64 the quality and the size of the image will be saved.