图片转 Base64
将图片转换为 Base64 以直接嵌入 HTML、CSS 或 JavaScript。
Click to upload or drag and drop an image
Supports PNG, JPG, GIF, SVG, WebP
Image to Base64 - 技术详情
Base64 encoding allows binary image data to be represented as ASCII text, enabling you to embed images directly in HTML, CSS, or JavaScript without separate image files. This reduces HTTP requests but increases file size by ~33%.
命令行替代方案
# Encode image to Base64 in terminal base64 image.png # Create data URI echo "data:image/png;base64,$(base64 image.png)"