Home › Image Tools › Image to Base64
Image to Base64 Converter
Embed small images straight into HTML, CSS or JSON as text.
Choose images or drag & drop hereJPG, PNG, WebP, GIF · paste with Ctrl+V · processed on your device, never uploaded
- Free & unlimited
- No sign-up
- Instant results
How to use the Image to Base64
- Choose the output: data URI, raw Base64, CSS or HTML.
- Drop one or more images.
- Click Copy and paste it into your code.
When to use Base64 images
Embedding saves a separate download, which helps for tiny images like icons, logos in emails or images inside a single HTML file. Base64 makes files about 33% bigger and cannot be cached separately, so for anything over ~10 KB a normal image file is faster.
Output formats
data:image/png;base64,iVBORw0KG…
background-image: url("data:image/png;base64,…");
<img src="data:image/png;base64,…" alt="">
Frequently asked questions
Are my images uploaded?
No. Everything happens inside your browser on your own device. Your images never leave your computer or phone, so it is safe for private photos and work files.
How do I turn Base64 back into an image?
Paste the data URI into your browser's address bar, or use our Base64 decoder for text.
Does it work with SVG?
Yes. For SVG you can also embed the SVG code directly, which is often smaller.
Is there a size limit?
No hard limit, but very large images produce huge strings that slow pages down.