Drag & drop or click to upload
Max 10MB - Ctrl+V to paste
Encode an image as a Base64 data URI to embed directly in code
You might also like
How to use Image to Base64
- 1
Upload an image
Drop a JPG, PNG, WebP, GIF, or SVG file.
- 2
Choose the output
Get the raw Base64 data URI, or wrap it as a CSS background or an HTML img tag.
- 3
Copy and paste
Copy the result and embed it directly in your code — no separate image file needed.
Features
- +Raw data URI, CSS, or HTML output
- +Embed images directly in code
- +Works with PNG, JPG, WebP, GIF, SVG
- +100% browser-based — image never uploaded
- +No watermark, no signup
Frequently Asked Questions
What is a Base64 image used for?
Embedding small images directly in HTML, CSS, or JSON so the browser doesn't make a separate network request — handy for icons, email templates, and inlined assets.
Should I Base64-encode large images?
No. Base64 increases size by roughly 33% and isn't cached separately, so it's best for small images. Use a normal file for large photos.
Is my image uploaded anywhere?
No. Encoding happens in your browser with FileReader, so the file never leaves your device.
Related Tools
If you need the next step, try Format Converter, SVG to PNG, Image Compressor, Image Info.