Image to Base64 Description
Convert images to Base64 strings or Data URIs. Ideal for embedding small images directly into HTML or CSS.
How to use
- Upload an image file or drag and drop it into the tool.
- Select the output format (Data URI, CSS background-image, or raw Base64).
- Copy the generated string.
Common Scenarios
- Embedding small icons or logos directly into HTML/CSS to reduce HTTP requests.
- Sending image data via JSON APIs.
- Storing small images in databases as strings.
Data Structure
The result is a long ASCII string. For Data URIs, it includes a prefix like data:image/png;base64,....
Principles
The tool reads the binary data of the image file and uses the Base64 encoding algorithm to represent it using only 64 printable ASCII characters.