图片转 Base64 Data URI 与反向还原,支持批量处理、CSS/HTML 代码生成。
Convert images to Base64 Data URI, support batch processing and code generation
Runs locally · Nothing uploaded
Online image Base64 encoder/decoder tool that converts image files to Base64 Data URI format and restores Base64 strings to image previews. Ideal for frontend development scenarios like inlining small images, CSS background images, HTML img tags, and email template embedded images. Supports JPG, PNG, GIF, WebP, SVG, ICO and other common formats with batch processing. All conversions run locally in the browser for data privacy.
Base64 encoding increases size by ~33% because every 3 bytes become 4 characters. Suitable for small icons/images; large images should use external links.
Supports JPG/JPEG, PNG, GIF, WebP, SVG, ICO, BMP and all browser-recognizable image formats.
Check if Base64 string is complete and includes correct MIME prefix (data:image/png;base64,...); tool auto-completes common prefixes.
Yes, select or drag multiple files at once. Tool converts each and displays list with one-click copy all.
Data URI includes MIME type prefix (data:image/png;base64,) for direct use in src/href; raw Base64 is encoding only, requires manual prefix.