Image to Base64 Converter
Embed a small image in CSS, HTML or JSON without a second file, or restore a Base64 string into an image you can save. Your files never leave the browser.
Free Runs locally No signup
Drop an image herePNG, JPG, WebP, GIF, SVG or AVIF · up to 8 MB
Files are processed in your browser and never uploaded.
How to use it
1
Choose a direction
Convert an image file to Base64, or paste a Base64 string to rebuild the image.
2
Drop or paste your file
Drag an image into the box, pick one from your device, or paste the Base64 payload.
3
Copy or download
Copy the data URI, HTML or CSS snippet, or download the decoded image in its original format.
Why use this tool
Ready-to-paste snippets
Output a plain data URI, an img tag or a CSS background rule without editing the string by hand.
Format detection
The decoder reads the file signature, so PNG, JPEG, WebP, GIF, SVG and AVIF are recognised automatically.
Size awareness
See the original size, the Base64 length and the overhead before you commit the image to a bundle.
Frequently asked questions
How much larger is Base64 than the original file?
Base64 adds about 33 percent, because every three bytes become four characters. A 30 KB icon becomes roughly 40 KB of text.
When should I embed an image?
Small icons, logos, fonts and placeholders are good candidates. Large photos bloat HTML, block rendering and cannot be cached separately.
Which image formats are supported?
Any image the browser can read. Encoding keeps the original bytes, and decoding detects PNG, JPEG, WebP, GIF, SVG, AVIF, BMP and ICO.
Does transparency survive?
Yes. The file is not re-encoded, so PNG, WebP, GIF and SVG transparency is preserved exactly.
Is Base64 good for SEO?
No. Search engines prefer normal image URLs with alt text and caching. Use data URIs for small decorative assets, not content images.
Related guides
Related tools
Developer Tools Base64 Encoder & Decoder Encode text to Base64 or decode Base64 back to text, with full UTF-8 and URL-safe support. Runs locally in your browser — no upload, no signup. Image Tools Image Format Converter Convert PNG, JPG and WebP images in your browser. Choose the output format and quality, keep transparency where supported, and download instantly. Image Tools Image Compressor Compress JPG, PNG and WebP images in your browser. Control quality, resize by width, compare file sizes and download the result without uploading. Image Tools Favicon Generator Generate a complete favicon set from one image: crop the square area, render 16–512 PNGs, an Apple touch icon, a web manifest and an HTML snippet. Image Tools Image Resizer Resize JPG, PNG and WebP images by width, height, percentage or an exact box. Keep the aspect ratio, compare file sizes and download locally. Image Tools EXIF Viewer & Remover Inspect the EXIF data in your photos and download a clean copy without GPS, camera or timestamp metadata. JPG, PNG and WebP stay on your device.
Last updated: