Base64 is a representation method based on 64 printable characters to represent binary data. Every 6 bits is a unit, corresponding to a certain printable character. 3 bytes are equivalent to 24 bits, corresponding to 4 Base64 units, that is, 3 bytes can be represented by 4 printable characters. It can be used as the transmission encoding of e-mail. The printable characters in Base64 include letters AZ, az, numbers 0-9, so there are 62 in total characters, and the two printable symbols differ in different systems. Some other encoding methods such as uuencode, and later versions of BinHex use a different 64 character set to represent 6 binary digits, but are not called Base64.
Base64 is often used to represent, transmit, and store some binary data, including MIME emails and some complex data in XML, where text data is usually processed.
What can the image to Base64 encoding tool do?
- Convert pictures into base64 encoding, which is generally used for small pictures on the web, which can not only reduce the number of pictures requested (collected into js and css codes), but also prevent pictures from being caused by some relative paths and other problems 404 error.
- Support png, jpg, gif, bmp, ico, svg formats.
- Use in CSS：background-image: url("data:image/png;base64,iVBORw0KGgo=...");
- Use in HTML：<img src="data:image/png;base64,iVBORw0KGgo=..." />
How to use?
- 1) Click to select the file and wait for the encoding to complete
- 2) Copy encoded data