图片转Base64
将图片转换为Base64 Data URI字符串,用于嵌入HTML、CSS和JSON。
拖拽图片到此处
或 浏览文件
支持 JPG、PNG、WebP、GIF、SVG、BMP
Ctrl + V 粘贴
文件数
已编码
原始大小
Base64大小
原始
Base64
Base64字符串
设置
Related Tools
Compress Image
Compress JPG
Compress PNG
Compress GIF
Compress HEIC
Compress WebP
Compress BMP
Compress ICO
Convert Images to Base64
Image to Base64 converter lets you encode any image into a Base64 string directly in your browser. This is useful for embedding images directly in HTML, CSS, or JSON without separate file requests.
All processing happens locally. Your images are never uploaded to any server, ensuring complete privacy and security.
Data URI Encoding
Generate complete data URIs ready to paste into your HTML img src or CSS background-image properties.
Batch Processing
Encode multiple images at once and copy all results as a structured JSON object.
Zero Upload
Files stay in your browser. No server uploads, no cookies, no tracking. Your data stays private.
How to Use
Upload one or more images using drag-and-drop, file picker, or paste.
Choose output format: raw Base64 or full Data URI.
Click "Encode All" to convert images to Base64 strings.
Copy individual results or all at once as JSON.
FAQ
Base64 is a binary-to-text encoding scheme that converts binary data (like images) into ASCII strings. It increases file size by about 33% but allows images to be embedded directly in text-based formats.
A Data URI is a URI scheme that embeds data directly in a URL string. For images, it looks like data:image/png;base64,iVBORw0KGgo... and can be used in HTML, CSS, and other web contexts.
There is no server-side limit since all processing happens in your browser. However, very large images may produce very long Base64 strings that some applications cannot handle.
No. All encoding happens locally in your browser using the FileReader API. Your images never leave your device.