图片转 Base64 转换器
将图片转换为 Base64 编码字符串和 data URI。支持 PNG、JPG、GIF、SVG、WebP。拖放上传。免费使用,无需注册。
Drop an image here or click to select
Supports PNG, JPG, GIF, SVG, WebP, ICO
About Image Base64 Encoding
This base64 to image converter lets you encode images to Base64 strings or decode Base64 back to viewable images. Embed images directly in HTML using <img src="data:image/png;base64,...">, in CSS with background-image: url(data:image/png;base64,...), or store them in JSON configs. Supports PNG, JPG, WebP, SVG, GIF, and ICO formats. The data URI format includes the MIME type prefix, while raw Base64 is just the encoded string. Best practice: only Base64-encode images under 10KB to avoid bloated HTML. All conversion happens client-side for privacy.
💬 User Feedback
评价此工具
4.4 / 5 · 76 人评价
Recommended
CloudflareFree CDN & DDoS protection保持更新
获取每周开发技巧和新工具通知。
无垃圾邮件,随时退订。
Enjoy these free tools?
☕Buy Me a Coffee使用方法
- Drag & drop an image or click to select a file
- View the Base64 string, data URI, HTML tag, and CSS snippet
- Copy any format you need
- Switch to 'Base64 → Image' tab to decode
常见用途
- Embedding small icons in HTML/CSS
- Including images in email templates
- Storing images in JSON/YAML configs
- Reducing HTTP requests for small assets