Image to Base64 Converter
Turn any image into a Base64 data URI without uploading. Drag and drop a PNG, JPG, GIF, WebP or SVG and instantly get the raw data URI plus ready-to-paste HTML <img> and CSS background-image snippets. You also see the original size, the encoded size and the Base64 overhead, with a warning when a file is too big to inline. Need the reverse? Paste a data URI or Base64 string to preview the image and download it.
Everything runs in your browser — your image is never uploaded. Max 10 MB.
100% client-side. The file never leaves your device.
Paste a full data: URI, or raw Base64 for a PNG, JPEG, GIF, WebP or BMP image.
Your result will appear here
Choose an image to get its Base64 data URI, or paste one to preview and download.
Dimensions Pixel width × height of the image.
—
Original size The raw file size before Base64 encoding.
—
Data URI size Length of the full data: URI string you paste into HTML or CSS.
—
Base64 overhead Base64 adds roughly 33% to the byte size compared with the raw file.
—
Data URI
HTML <img> tag
CSS background-image
How to use
- Open the Image → Base64 tab and drag an image onto the drop zone, or click to browse.
- Wait a moment while the image is encoded entirely in your browser — nothing is uploaded.
- Copy the raw data URI, the HTML <img> tag or the CSS background-image snippet you need.
- Check the size and overhead stats; heed the warning before inlining large images.
- To go the other way, open Base64 → Image, paste a data URI, then preview and download the file.
Features
- Drag-and-drop or file picker for PNG, JPG, GIF, WebP, SVG and more
- Ready-to-paste snippets: raw data URI, HTML <img> tag and CSS background-image
- Original size, data URI size and Base64 overhead shown at a glance
- Bloat warning when a data URI grows past 100 KB
- Reverse mode: paste a data URI or Base64 to preview and download the image
- 100% client-side — your image never leaves your device